A cooker knows when rice is done because of the temperature rise of the insert. When the water gets absorbed or evaporates, this temperature increase happens more quickly. At some point, it reaches a set target which then triggers the cooker to lower/turn off the heat, depending on your settings or brand.