An egg cannot be fertilized when there are no sperm in the semen. The testicles continue to produce sperm, but the sperm are reabsorbed by the body. (This also happens to sperm that are not ejaculated after a while, regardless of whether you have had a vasectomy.)
Sperm are made in the testicles. They pass through two tubes called the vasa deferentia to other glands and mix with seminal fluids to form semen. Vasectomy blocks each vas deferens and keeps sperm out of the seminal fluid. The sperm are absorbed by the body instead of being ejaculated.