A vasectomy is a surgical procedure for males that involves cutting or sealing the vas deferens, the tubes that carry sperm from the testicles to the urethra. This prevents sperm from mixing with semen and thereby prevents pregnancy. The procedure is typically done under local anesthesia and is less invasive compared to tubal ligation.