The chainrings are one or more sprockets that transfer power from the crankset to the cassette via the chain.
More gears helps cyclists keep the same cadence at many different speeds. Depending on the type of bike, it may need one, two, or three chainrings. Road and mountain bikes use a range of speeds and have a need for many gear combos. Some genres like BMX, downhill, and hardtails have just one chainring. They save on weight, and have lighter profiles for neat tricks and stuff.
Chainrings can range from about 20 to 55 teeth, and can be constructed from aluminum alloys, steel, titanium, or carbon fiber.
The teeth on chainrings with multiple sprockets are usually cut in a way that helps move the chain shift. The middle chainring shifts up and down, so it usually has ramps on either side, while the highest chainring will only shift down. Its teeth only have ramps to one side. The chain will be set down on and picked up from the smallest cog, so it usually has the least amount of shape on its teeth.
Chainrings attach to the crankset by what is called a spider (arms extending from the drive side crank arm). On cheaper bikes, the crankset is one piece, and sometimes the chainrings are welded directly to the crank arm! When the chainring wears out, the whole crankset needs to be replaced. Other scenarios have a pin on the drive side crank arm that inserts into the chainring, providing the power.
With more expensive bikes however, the chaining bolts to the spider, making replacements easier and obviously more affordable. These can be either four or five bolt. Why two systems you ask? Mountain bikes have big scary chainrings that might flex under heavy load, so the thicker frame and rigidity is needed. Other bikes conserve weight and opt for four bolt chainrings.