Energy conversion and efficiency
Efficiency is useful output divided by total input. Whatever is not useful is wasted, usually as heat.
A worked example
A lamp given 60 J of electrical energy that gives out 9 J of light is 9/60 x 100 = 15% efficient, wasting 51 J as heat.
The mistake people actually make
Energy is never destroyed, only moved into forms you cannot use. Nothing is 100% efficient.