Surround your swimming pool with a 4 feet tall fence. Ensure that the gaps between the fences are no wider than 4 inches.
Add an underwater pool alarm that sets off, when something hits the water. That way, you will ensure that your toddler, who doesn't know swimming, doesn't approach the pool. Even if he/she approaches, make sure that the alarm is loud enough to be audible, when you are indoors, so that you could take immediate action for his/her rescue.
Install a rigid, motorized safety cover to refrain the access to the pool, when it is not in use.
You can also prevent the toddler from approaching your pool, when not in use, by locking the pool steps or ladders.
Do not leave the pool toys floating in water. In an attempt to retrieve the toy, your child might jump into the pool, which may in turn lead to an accident.
You may teach your child to swim, when he/she is 5 years old. Be sure to drown-proof your child, when he/she is learning to swim.
Never allow your child to allow to swim without the supervision of an adult.