In brief, fully automatic firearms (aka "machine guns") are heavily regulated under the National Firearms Act of 1934 (the "NFA"). The only ones available for sale to private citizens are those on the "NFA registry" on what is known as a "Form 4." These are known as "fully transferable" machine guns. It has been illegal to import machine guns since 1969, and illegal to manufacture them since 1986. Because the supply is limited to those already in existence and on the registry, prices have skyrocketed. Expect to pay a minimum of $5,000 for some submachine guns, $15-25,000 for an M16/AR-15 with full auto capability, and even higher for more rare machine guns.
If you find one for sale, and can afford it, you need to go through a dealer licensed to sell NFA items, and undergo a special BATFE background check. The background check typically takes 6-12 weeks. If you pass the background check, you need to pay a $200 transfer tax. Then, you can pick up your machine gun, which will now be registered to you.
Also, some states do not allow private citizens to own machine guns, so check your state laws first.
Semiautos are much more available and easier to buy. Check your state and local regs, because some states place special restrictions on the sale of some types of semiautomatic firearms.