Put simply, both are tubes of smooth muscle tissue with cilia inside to propel sperm through a physical barrier to get sperm from one part of the male reproductive system to another.
The vas deferens transport sperm from within the scrotum (ball sack), through the abdominal muscle wall, into the prostate. There are two of them, each about one foot, or 30 cms, long. In a warm shower, with the scrotum relaxed and hanging, gently squeeze the sack above the balls between your thumb and index finger. You will feel many strings going straight up and down, vertically. On each side, there is one that is thicker and firmer than the rest. They feel like cooked spaghetti. Those are the vas deferens.
The efferent ducts transport sperm from inside the testes, through the tunica wall, into the epididymis, which is the soft, spongy thing you can feel attached to a testis at the top and down one side, usually the back. There are 15 to 20 efferent ducts on each side. They are very small, 2-3 mm, and move sperm, by cilia and smooth muscle contractions.