The vas deferens (or ductus deferens)  is a duct in a man’s body. It is also present in other male vertebrates. Its function is to carry sperm away from the testes, towards the penis.
There are two of these ducts, which are tubes surrounded by smooth muscle. They connect the left and right epididymis to the ejaculatory ducts in order to move sperm. Each tube is about 30 centimeters long. During ejaculation the smooth muscle in the wall of the vas deferens contracts. That pushes the sperm toward the penis. The sperm go from the vas deferens into the urethra. Other male sex glands push out at the same time.
There is a surgery called vasectomy that is a method of contraception. The two vasa deferentia (Latin plural) are cut and sealed, so the sperm cannot get out of the body. This is usually permanent, but in some cases it can be reversed. Sometimes instead of cutting the vas deferentia, the surgeon puts something to block the sperm instead of cutting them.