Ejaculation is the release of semen out of the penis.
When ejaculation happens during sleep, it’s called a nocturnal emission or “wet dream.” It’s normal to have nocturnal emissions… it is also normal NOT to have them.
Here’s how ejaculation works:
Muscle contractions propel sperm from the epididymis through the vas deferens.
Sperm mix with sugary fluids from the seminal vesicles + prostate gland, making semen or seminal fluid.
Semen leaves the body through the urethra at the tip of the penis.

If you have an extra 4 minutes, watch this video from FreeMedEducation to learn how the parts of male reproductive system work together during ejaculation.