I've known of, and experienced, several online relationships. They often develop because one or both parties is in search of something--a sympathetic listener, encouragment, advice, or perhaps excitement.
This medium permits, perhaps induces, a significant degree of fantasy. Some are unaware of the influence of their fantasies on their interaction, some are cognizant of and enjoy the fantasy aspect. In some cases, one party is aware of the fantasy element (generally someone who has been online for awhile) while the other party is not (generally a "newbie"). There have been many cases in which "newbies" have been taken advantage of as a result.