The term originates from the fact that Japanese (as well as several other East Asian languages) does not have separate sounds for R and L. In Japanese the R sound is pronounced as an alveolar lateral flap (ɾ), articulated with the tongue flapped against the hard palate behind the front teeth, so that it sounds like a Spanish soft R. Because Japanese does not have a separate equivalent for the English L, native Japanese speakers not fluent in English often mispronounce English words containing the letter L. While the term mocks the accent, it is used mainly without malice in reference to humorous misuses, puns, and double entendres within written English, not difficulties in pronunciation. For example, "election" might be pronounced "erection".
Note that even though the "L" and "R" error is often attributed to Chinese, in reality, there are distinct "L" and "R" sounds in standard spoken Chinese (Mandarin). Various dialects of the Chinese languages, however do not have such clear separation with a general pattern being the further south in the country one travels, the more likely one is to see the "L" and "N" sounds confused (central China) or even the "L", "N" and "R" sounds freely alternated (south of the Yangtze River/Changjiang).