Origin of the word "cum"
Solution 1:
It's an informal way of spelling 'to come', which can mean having an orgasm. How exactly that verb has become associated with sexual acts is unclear (to me). My best guess would be that it was commonly used in a phrase similar to:
I'm coming to an orgasm!
Solution 2:
Etymonline explains:
cum (verb and noun) seems to be a modern (by 1973) variant of the sexual sense of come that originated in pornographic writing, perhaps first in the noun sense. This "experience sexual orgasm" slang meaning of come (perhaps originally come off) is attested from 1650, in "Walking In A Meadowe Greene," in a folio of "loose songs" collected by Bishop Percy. [...]
As a noun meaning "semen or other product of orgasm" it is on record from the 1920s. The sexual cum seems to have no connection with Latin cum, the preposition meaning "with, together with," [...].
To this, I will add that as far as the verb come is concerned, there are similar constructions in German (kommen) and French (arriver).
Solution 3:
The Oxford English Dictionary has a definition for "Come" that first developed in 1440 that may have the answer for the double entendre that is "Cum."
When roasting certain grains during the malting process, the malt rises at the top and sometimes shoots off. This was referred to as the "come." Like in this example, "In Corn, [the Radicle] is that Part, which Malsters, upon its shooting forth, call the Come."
Solution 4:
According to Etymonline.com, the noun cum has had its current sexual connotation since the 1920s. As a verb, it goes back much farther.