Whales navigate the oceans using a combination of methods, including echolocation, landmarks, and the Earth's magnetic field. Echolocation allows them to bounce sound off objects in the water to create a mental map of their surroundings. Landmarks such as coastlines, islands, and underwater formations help them orient themselves. Additionally, whales are believed to have the ability to detect and follow the Earth's magnetic field, which assists in long-distance navigation.