How is a submarine powered?
Modern submarines are powered by a nuclear reactor. Others are powered by deisel engines while they are on the surface and batteries while they are submerged. The older ones that were powered by deisel and batteries had their limitations. While they were on the surface running on deisel engines they left a trail of exhaust smoke which gave away their position. When they were submerged and running on batteries they could only last so long and then they had to come to the surface, run the deisel engines and recharge the batteries. The submarines that are run by nuclear power do not have to resurface for a very, very long time.