The earliest "goldfish" were color mutations of the Gibel Carp that caught the eye of the Chinese as early as 265 AD. During the Tang dynasty (618-907 AD) Buddhist monks began to keep golden Gibel Carp in ponds. In the Song dynasty (1127-1279 AD) enthusiasm on the part of the royal family led to extensive breeding and ultimately domestication of what is now the goldfish. Goldfish were introduced to Japan and Europe in the 1600's and to the US in the late 1800's.
After all these centuries of selective breeding a truly surprising number of goldfish varieties have arisen. We'll briefly mention some of those commonly found here in the US. Besides the varieties, there are also many colors; based on combinations of 4 basic pigments, "goldfish" may range from white to red to black, passing through yellow, purple, and other variations on the way. There is also a reflective layer in the scales that may be present or absent (or a mix!), yielding fish that are shiny and metallic looking or matte and translucent.
To organize the discussion of goldfish varieties, we'll use a taxonomy of 4 basic types. This is by no means an accepted classification system ... but it works for me.
These are fish with the fleet, tapered form of the wild carp. They also have a single caudal fin. The so called "feeder fish" in pet shops are of this type. Examples of selectively bred varieties are the Shubunkin and American developed Comet. The Comet and some of the Shubunkin varieties, in correct form, have spectacular single caudal fins nearly the length of their bodies. These fish in proper conditions grow rapidly and can exceed 12" inches in body length. All of these varieties are quite hardy and are the most forgiving of imperfect conditions.
This category includes some of the most popular fancy goldfish. These fish have a paired caudal fin. All the fish in this group have very heavy bodies: even though a fish with an 8" body is unusually long, such a fish appears extremely massive, with the body depth approaching 2/3 of the length.
The Oranda is an example of a variety that displays both flowing finage and a raspberry-like head growth. The Ryukin has a massive curved back and a very heavy body. A US developed variety with particularly lovely finage is the Veiltail, characterized by forkless tails. An unusual fish in this group is the Pearlscale, which has a very round body and scales that protrude in the middle like half pearls. Someone once aptly described the pearscale as looking like a golf ball with the dimples popped outward. The hardiest fish in this group is probably the Fantail. Fantails are typically very active fish that can approach the sizes of the carp-like goldfish at maturity.
Perhaps the most shocking at first sight, there are several popular varieties of goldfish whose key features are abnormal eye configurations. The most common is the Telescope Eye, with eyes that protrude straight out of the head. The telescope eye has a dorsal fin and double tail, like the fish in the previous category. The Bubble Eye and the Celestial are two dorsal-less varieties with double tails. Both have protruding eyes that are turned upwards. The bubble eye in addition has fluid filled sacks that protrude out from under the eyes. These sacks can become very large, making these fish very awkward swimmers.
To understand the attraction of these varieties, it helps to remember that the aquarium is a relatively new invention. These fish have been bred for centuries to be interesting to look at from above, while swimming in ponds. Some of these fish can be very graceful swimmers, but are not particularly adept at avoiding obstacles; sharp objects or rough surfaces have no place with them.
While many of the above fish are arguably "egg-shaped", the fish in this category lack dorsal fins and have typically egg-like or "boxy" bodies. The two most popular varieties are the Ranchu and the Lionhead. These fish are similar, with headgrowth, short double caudal fins, and smooth back contours without evidence of the missing dorsal fin. The headgrowth in these varieties can become very large, particularly for the lionhead. For a discussion of the difference between lionheads and ranchu, check out this. Some varieties also sport nasal growths, called "pompoms", that look like fleshy balls balanced on the snout.
There are many more varieties, but this is a representative sample. Much like varieties of dogs or cats, different types of goldfish have unique varietal "personalities". Different shapes and fin configurations lead to different swimming styles and behaviors. Some varieties are traditionally more durable and forgiving of less-than-perfect care than others. The on-line goldfish discussion/news groups are a good way to find out what might be best for you!