A neologism is an invented or artificial word. The purpose of this entry is to highlight the areas in which new words have been created by people to fulfil a specific purpose (eg the word 'laser' was invented to describe something new).
Invented Words in Science
When scientists invent or discover something new, it requires a name or some other way of referring to it. Sometimes it is named after the inventor or discoverer, like Murphy's Law, and sometimes this leads to a new word entering the language, like 'diesel' for the engine invented by Rudolf Diesel and the fuel it runs on. At other times a new word is used that finds its way into everyday language (or is at least recognised by nearly everyone). A good example of this is the word laser, which is an acronym of Light Amplification through the Stimulated Emission of Radiation and was coined in 1959 by Gordon Gould1 based on the acronym 'maser'2. Similarly, 'radar' stands for 'RAdio Detection And Ranging and was coined by US Navy researchers in 1942. New words in science are often based on existing words, especially Latin and Greek ones, like the term invented by Marie and Pierre Curie for the newly discovered phenomenon 'radioactivity' which shares a Latin root with the name 'radium' for one of the radioactive elements. (And after the potential of radioactivity was fully realised by the wider scientific community, Marie had a element named in her honour, 'Curium'.)
Invented Words That Replace Swear Words
In order for literature/TV/Film to become more widely available and achieve better sales, writers often coin new words that replace swear words. This practice is most common in science fiction, fantasy and comedy genres, as the suspension of belief is naturally greater. This list is just a short rundown of the most common:
'Fug' - American author Norman Mailer used this word in The Naked and the Dead as a euphemism for the f-word.3.
'Frell' - Characters in the SF series 'Farscape' use this word in times of stress. Most believe this is yet another allusion to the f-word.
'Smeg' - The writer Grant Naylor4 created the word smeg (along with goit and gimboid) for their TV sci-fi comedy Red Dwarf. The word didn't mean anything in particular, it was just a general expletive. Little did they know that smeg was also the name of a fridge manufacturer and its closeness to the word 'smegma' has led some to believe that it is a contraction of that word.
'Naff' - The TV sitcom Porridge used the word 'naff' (usually when saying 'naff off') as a general expletive.
Literary Figures who Invented Words
The master of the made-up word is Lewis Carroll. His poem 'Jabberwocky' is full of them. 'Chortle' is one word from this poem that has made the jump to everyday English. Note that Jabberwocky appears in his famous novel Alice Through the Looking Glass (The sequel to Alice's Adventures in Wonderland).
Due to the amount of time between now and when he was writing, few people realise that Shakespeare made up a lot of words that we use today. There are far too many to name individually, so if you want to find out more read Shakespeare's Coined Words.
Science fiction and fantasy authors invent lots of words, and some of these words enter our everday language, some enter the common vocabulary of such authors, and some are only used by the one author and possibly the fans.
JRR Tolkien came up with the race and name hobbit and invented many words to describe the different aspects of his Middle Earth. As a linguist who used to make up new languages as a hobby, his invented words can be enjoyed on several levels, often belonging in a specific language and having an (invented) etymology.
Acronymic words are of course popular in SF and author Larry Niven uses 'tanj' as futuristic expletive in his 'Known Space' stories (eg Ringworld). He explains 'tanj' as being a abbreviation of the phrase 'there ain't no justice'.
And yes, before you say it, one Douglas Adams, who wrote a radio series/book/tv series about Arthur Dent's travels through space and time also invented some words, such as hooloovoo (a super-intelligent shade of the colour blue) and frood (a cool person).
Invented Words in the Electronic Age
When e-mail/message boards first sprung up on the Internet, people wanted to minimise character strokes. For this reason, new acronyms, smileys and emoticons were created. That's not to say that acronyms and smileys weren't around beforehand, just that more were created and their use was even more widespread. This idea was taken even further when text messaging became popular as most phones and networks allow a maximum of 160 characters per message and people tried their best to get the most out of this quota. For this reason it is common place to read a text message like this - 'Hey. I'm on my way bak 4m de cine. B round 15mins. Gav'. For some, this is hard to decipher. For those in the know it reads, 'Hello there, kind and friendly gentleman. I am on my way back from the picture house and will be home in approximately 15 minutes. Gavin.'
As seen in the example most of these are just shortened forms or creative spellings of existing words, and most of the time they are pronounced in full. But as time goes by and the origin of acronyms and short forms become less obvious the chance increases that someone, somewhere, insert them as actual new words. Reports are already in on 'lol' used as a word. (From LOL - laughing out loud.)
If you want to read more about technology-driven words and phrases, The New Hacker's Dictionary might be useful. It's a huge resource of information, and partly understandable even for non-technical people with an interest in language.