Basically, the energy stored in the muscles and from food is converted into kenetic energy in the legs. The legs transfer this energy to the pedals, which turn the rear wheel, which gives us motion.
Much energy is lost in the form of heat as well.
A person on a bicycle puts out an average of .4 horsepower when riding hard, with a peak of around 1 hp. This may seem low, but it is actually higher that a car running at everyday speeds and temperatures. Some energy is lost in the form of sound, but the majority is heat. This means that stationary bicycles are not all that good because they do not allow the hot air to be removed from the body, and this decreases performance. You still get a workout, but data is not all that acurate.