It's called an epicycloid. You can find a beautiful page about epicycloids on the mathworld site. If the circle rolls inside another circle then the curve is called a hypocycloid.
You can generate your own epicycloids, hypocycloids and related curves by using a spirograph.
Stephen and Penny