With a snorkel attached. The engine needs oxygen and dislikes water. Both sides of the war invented that capability in the early 40s, though obviously not every tank had the capability.
It's also a great example of the doctrines and tradeoffs of different armies. For example Russian tanks usually have space-efficient thin snorkels, while modern Western tanks have wide snorkels that double as a way for the crew to escape if they get stuck while driving submerged