There are a number of appliances that "know" when they should turn off. A rice cooker is one of them. The water-heating portion of a drip coffee maker (as opposed to the burner under the pot) is another. Automatic hard-boiled-egg makers work the same way.
All of these appliances use the same principle. If there is water in a heated container and the water is boiling, the container will maintain a constant temperature. See How Refrigerators Work for two experiments you can perform to prove this fact to yourself.
At sea level, the boiling temperature for water is 212 degrees F or 100 degrees C. As soon as all of the liquid water has evaporated (or, in the case of the rice cooker, as soon as all of the water is absorbed by the rice), the temperature inside the container immediately rises. The appliance has a thermostat that can detect when the temperature rises above 212 degrees F in the container, and it turns itself off.