If you want to go into the very basic principle, it is simply the conversion of electrical energy into heat through the use of heating element/s to raise the temperature of water to a certain degree.
Obviously this is not much different from a common immersion rod which you can dip into your bucket, plug into the power socket and get going. The only difference is the level of sophistication and slight automation in the geyser.
Of course different heaters of different companies and brands can have slightly different arrangement but the basic concept behind all of them remains the same. You can take a look at the diagram below to understand the construction of a typical heater.