If you are trying to learn how to swim in Bitlife, it's easy. In short, to learn how to swim in Bitlife, you will need to age to the point where you are both 13 and in middle school. Once you are in middle school, you will need to try out to the swim team and successfully join the club.
You can do this by finding it under the list of all school activities in the school tab. If you have trouble joining, try raising your athletic skill by going to the gym and working out, but other than that, you shouldn't have any trouble.
That said, once you found and joined it, you will learn how to swim in the game, which is more important than you may realize.
Related: How to complete the Land, Sea, and Air Challenge in Bitlife
For example, for this week's challenge, the Land, Sea, and Air, you will need to survive a dangerous encounter which is an accident, to complete it. These encounters can happen at random while you take either your boat or plane out for a joy ride, and so it's highly recommended to know how to swim.
This is because it gives you a high chance of surviving any of these encounters when they occur. It's also helpful incase it's ever needed for another challenge in the future.
For more on Bitlife, check out How to get a Boating License in Bitlife and How to become a Pilot in BitLife – Pilot License Test Answers!