Power Meter
Power meters measure your power output. This StackExchange question has more in depth discussion about how to use one, but briefly, they enable structured training (where you do repeated efforts at various intensity levels). They aid in pacing an effort. They are ubiquitous in professional road racing at the time of writing. Very few amateur cyclists need one to progress satisfactorily, as it is possible to do un- or informally-structured training or to train with heart rate. However, power meters can benefit many riders. Power is better than heart rate for pacing an effort because heart rate will take several seconds to respond when you start an interval, and it will likewise take several seconds to come down when you stop an interval.
For structured training, riders estimate their functional threshold power (FTP). This is the maximum power you can sustain for 45-60 minutes, when your body is relying mainly on aerobic (as opposed to anaerobic) processes to generate energy. You can then base intervals off your FTP, e.g. warm up, ride 15 minutes at 93-100% of FTP, recover, repeat once, cool down. Riders typically re-estimate their FTP several times during the season. There are several protocols to do this. A common one is to warm up, then ride a 20 minute maximum effort, then take 95% of the average power during this effort.
A brief history and basic technical information
Power meters use strain gauges, which measure the amount of deflection in a bike component, as well as a cadence sensor. This answer has more detailed information on how power meters work physically. They transmit this information wirelessly to a computer, typically over Bluetooth or a sport-specific protocol called ANT+. The data files can be analyzed by a coach and uploaded to a training site like Strava. Note that power meters require a computer capable of communicating via ANT+ or Bluetooth to work, which is an additional expense. The PowerTap shown below had a proprietary computer, but all current power meters work with most bike computers that have ANT+ or Bluetooth capability.
The first power meters were made by SRM (Schoberer Rad Metrik, a German company), and they were very expensive. As with many electronic goods, they have declined substantially in price in recent years. SRM power meters replaced the chainring spider, and several other power meters are still mounted here. Later power meters were mounted in hubs (e.g. PowerTap, now owned by SRAM, pictured below), one or both crankarms (i.e. without replacing the spider entirely, Stages was probably the first), or the pedal spindles. Less commonly, companies have mounted power meters in the crank spindle. E-bikes also measure power to determine how much assistance to provide.

Power meters mounted at the crank spider or in the hub will measure a rider's total power, but they do not directly measure the amount produced by each leg (although they can estimate it). Power meters mounted on the crankarms or pedal spindles are capable of actual dual-sided measurement, although note that people may conflate the phrase dual-sided with total power measurement. Manufacturers commonly offer left-only power meters as an entry-level option. Left-only meters measure power at the left leg and double it. This is presumably the weaker leg for most riders, and hence it produces a conservative measure of power. The advantage to true dual-sided power is that you can determine if you have a muscular imbalance, but it isn't clear how critical this is. Additionally, if you have one bike with a left-only meter and you have a total power measurement on another bike, your power measurements may not be comparable, which has implications for FTP testing and effort pacing. Many power meters' software allow you to set an offset, i.e. increase the reported power by x%, which can be one workaround.
Power is key to virtual cycling environments like Zwift, where you simulate a rider's progress through a course and interactions between multiple riders. Virtual cycling programs can accept readings from a power meter. A traditional trainer can be used to estimate power as well, although this is less accurate than an actual power meter. Last, smart trainers measure power at the trainer's flywheel, and they can vary the flywheel resistance to simulate changes in gradient on the course.
Maintenance
Power meters are sealed units. They don’t suffer wear in the same way that chains, cables, and other bike components do. The batteries will need to be replaced periodically, or if the power meter has integrated lithium ion batteries, these will slowly lose capacity. The strain gauges are delicate, and users should take as much care as possible not to knock the power meter unnecessarily.
Power meters may need to be periodically zeroed, I.e. have the software confirm the strain gauge reading when unloaded, like you would tare a weighing scale. Many newer ones can auto zero. If you suspect a power meter is still reading wrongly, another step may be to calibrate the slope, I.e. the change in resistance with a known weight. This is usually done at the manufacturer, although some power meters enable users to do this.
Reference:
Wikipedia