The original electrical meters had a spinning disk that turned other disks and recorded how much current you used. That wasn’t entirely fair though since the voltage can vary a bit, and power is voltage multiplied by current. I doubt that there are very few single coil electrical meters still in use, but who knows. These meters would have been made back in the 1920s or 1930s or so.
To make it more fair, they went to two-coil meters. These meters have a coil that measures the current and another coil that measures the voltage, and both of these combined spin the disk so that the disk turns are proportional to the power and not just the current. If you have a mechanical meter, this is almost certainly what you have.
As noted, all you get with this type of meter is a total.
The newer “smart” meters still have the two coils, but instead of using them to electromagnetically spin a disk, each coil is fed into an A/D converter to digitize them. This allows the smart meter to measure and track a whole bunch of stuff that the mechanical meter can’t measure. For example, they can measure and track your power factor. Power is made up of watts and vars. Most people have heard of watts but not vars, because the power company only charges you for the watts. Vars are energy that is used to charge up devices like inductors and capacitors. Motors are inductive, so residential service tends to be slightly inductive due to things like washing machine motors, vacuum cleaners, refrigerator compressor motors, etc. Tracking the vars allows the power company to more precisely calculate how much capacitance they have to add at the substation to balance out the inductive vars to make the system more efficient (I can explain this a lot better if anyone is interested, but the basic point is that there’s a huge efficiency bonus for the power system if you keep the inductive and capacitive vars balanced). If your capacitive and inductive vars are all perfectly balanced, your power factor is 1. Anything less than 1 means your vars aren’t balanced and the system is running at less than peak efficiency.
As a side note, while residential service usually isn’t charged for vars, business and industrial users are charged out the wazoo for vars. That gives them a huge financial incentive to install their own power factor correction devices.
In addition to monitoring vars for efficiency, they can also measure and track the voltage to make sure that it stays within spec. Any sagging on the voltage can also warn them that the branch is getting close to being overloaded and they may need to add more capacity. Distortion of the voltage sine wave can also indicate problems, and the meters can track certain types of spikes and brownouts as well. This allows the power company to find and fix potential problems before they become bigger problems.
Since all of the data is digital, everything can be tracked like any other type of digital data. Some folks have privacy concerns about this since the power company can probably figure out when you’re awake, when you’re asleep, and when everyone is away at work and the house is probably empty.
The smart meters all talk to each other by sending communication data over the power lines, and basically forward data from one meter to the next all the way down the line until it gets back to the power company. The meters store a certain amount of data within the meter, but the important stuff (or at least what the power company thinks is important) is sent back to the main office where it gets tracked in regular ordinary computers.