You will need to build the stable in your settlement or visit a stable somewhere in the world to purchase the swimming lesson training. I also recommend purchasing the additional swimming lessons to make this faster. Now, put a marker down at least 3,000 meters away in the water and begin swimming with your horse.