Although whales live in water, unlike most mammals, they breathe in the same way, using their lungs to breathe. Then, this causes the whale to need to come out of the water to breathe. If they stay in the water all the time, they may drown. However, this situation is relatively rare. For one thing, their lungs are very large, larger than those of humans and most other animals, so they can dive into water after a breath and keep it for a long time. Second, whales control the timing of their breathing, which means they can judge whether they need to breathe or not, and if they need to, they will find the right time to come out of the water to breathe. As a result, they generally do not drown.
Many readers may wonder if whales drown when they sleep or are knocked unconscious? When whales sleep, they generally have two States, they may stay quietly in the water, or they may rest and swim slowly. In general, even if whales sleep, they will not sleep very dead, they will pay attention to their every breath, in the right time to breathe out of the water. However, in the case of being knocked unconscious, they do have the risk of drowning.
As mentioned above, whales use their lungs to breathe, and need to come out of the water to breathe once in a while. If they can't get out of the water to breathe because of special circumstances, they are at risk of drowning for a long time. If it takes longer, it will reach its limit, and even as mentioned above, whales may drown.