How do donors actually donate sperm?

Masturbation. For the actual donation, sperm is collected by the donor through masturbation. The larger process from applying to be a donor until the sperm can be released includes screening through medical and personal history taking, and extensive testing of the donor mainly for communicable diseases.
Collection into cup. Donors are carefully screened for medical history and risk factors, and tested for infectious disease. They then collect, by masturbation, into a cup. The sample is washed and frozen and placed into quarantine for six months. The donor is then retested for infectious disease and the sample released if testing is normal.