Dena gave you the good scoop on the basics.
The cheap wigs are usually made with bunches of synthetic hair glued or machine tied to a simple wig cap, which will have some sort of mesh structure attached to a slightly elastic flexible band. There are usually a couple of elastic straps inside the cap that can be stretched and hooked into loops if the cap is too large to fit well. These are generally 'one size fits all', so they won't fit well.

I've got one of these cheapies still (just found it, cleaning out some stuff) and it's pretty nasty looking at close range. The hair density is thin enough that the cap shows through in places.
As you go up in price, a couple of improvements can be found, such as finer synthetic 'hair', and finer meshes in the caps so the hair 'clumps' are smaller and closer together, or sometimes even individually machine tied. These wigs tend to look a little better and hold up longer. There's usually a patch of 'skin' colored material at the back or crown where the hairs appear to radiate outward from, so from behind at a little distance it's not too obviously wiggy. These are the typical $25 wigs on Amazon.
The stuff in a wig shop, unless they specialize in Halloween costumes and party wigs, will generally start with finer synthetic hair, often blended with multiple colors, and better caps with more range and often a silicone pad along the forehead. They may have pads for placement of wig tape, a medical double-sided tape that allows the wig to be anchored for more active wearers, wind exposure, and other top flipping risks.
Once you get into the $100 and up wigs, you'll also find a couple of really nice improvements. Mono tops, wigs that include a monofilament mesh as part or all of the cap, have individual hairs tied down to a fine mesh. Close up this looks pretty natural. It has the advantage that things like parts can be combed into the wig, and a limited amount of restyling can be done. (Look at those cheap wigs again. There's a reason they have a solid wall of 'bangs' and no part. The cap would show!)
Lace front and lace top wigs are another variation that shows up. These use a fine mesh to hold the hair at the front of the wig (at least). Special adhesives or wig tape can be used to attach the lace front to the scalp, which looks a lot like a hairline from a few feet or further back. Again, a part can be combed into these that looks pretty good, and can be changed.
Once you get into the several-hundred dollar range you'll find human hair wigs, and blends of human and synthetic. These get pricy, and take some care.
Even the relatively cheap synthetic wigs can hold up well with some care. Get a wig shampoo, and wig conditioner. A wig styling spray will be useful. There are 'travel' three packs sold that include the shampoo, conditioner, and styling spray, for $20-30 USD. A wig stand, an open frame to support the wig while stored or drying is also important. These are cheap, packs of 6 for $6 on Amazon. Yeah, three may be broken on delivery, but you've still got spares.

You'll also need wig brushes (these have loops instead of bristles to help straighten a wig), and rakes, a brush with short metal bristles, usually plastic tipped.
You'll want some wig caps, the things that look like nylon stockings that you pull over your hair or shiny head before putting on the wig. These reduce the transfer of skin oils to the wig, so it can go longer between washings and last longer.
You don't really need a styrofoam head, unless that helps you with visualizing a style. You'll probably want some sort of case to store the wigs on the stands when you aren't wearing them. I have a 24" x 12" x 15" high case that holds 3 wigs on stands, accessories, cleaning supplies, and brushes.
My oldest wig is about 4 years old, and I still wear it a few times a week. My 'best' wig is a multi-color synthetic hair wig, 65% gray and 35% brown, with a mono top. It matches what my remaining natural hair looks like very well. That's what my avatar is wearing today.