Sperm cells are produced in the seminiferous tubules, which are tiny tubes located inside the testicles. The sperm cells then travel through the epididymis, a long, coiled tube that connects the testicles to the vas deferens. The vas deferens is a muscular tube that transports sperm cells from the epididymis to the penis.
When a man ejaculates, the sperm cells are expelled from the penis through the urethra, the tube that carries urine from the bladder to the outside of the body.