It picks up the Electromagnetic Field produced by the coil sending current to the spark plug. So when the engine is running, and firing the plug, it's counting the time.
Unfortunately not. Only from installation and forward. Some of these older motors that didn't have a factory installed hour meter, there is no way to know. More modern engines, especially if they're fuel injected, have a computer that a dealer can read.