The primary external source of heat to the Earth comes from the Sun. If by secondary you mean what other source heats up the surface of the Earth, then it will most likely be volcanic activity from...
radioactive decay and residual heat
sunlight and meteor impacts
internal and external combustion engine
one way that i m familiar is: the ocean currents