Condom use

What is the proper way to use a condom to ensure not getting pregnant?