When developers were first releasing their software for free they realized that they could recover some of the cost of development while still keeping their software free. This became what we know as adware today. Although the term has become confused with malware and spyware it differs in very important ways. The theory on adware was that by embedding ads within a piece of software, the developers could monetize their programs.
The way adware was implemented differed from application to application. Quite often ads were displayed at the the top of the software, not unlike what we see on the web today. Other options included popup windows which would pop up when opening or closing the program or just every now and again. The slightly more obnoxious programs would download advertising that would then embed itself on the computer. All of this in itself was not a terrible thing. Users could benefit from great software that was well maintained.
Developers were motivated to improve their software to increase the revenue from the ads. But sneakier methods started being used. Ad spaces were being put into the software by advertising companies, and a few of these were using their commercials to send user information back to themselves. They could then analyze these to serve better ads to the users of the software. The problem was that users were not aware of all this happening.
Advertising companies were sneakily doing this without the knowledge of users or even the developers. This secrecy led to many people unknowingly downloading ads, and other software onto their computer without knowing that this was going to happen. Nowadays there are much fewer programs that are ad enabled than there were a few years back. This is partly due to suspicion on the part of users. Software that does incorporate advertising into the software incorporates only static ads that don't change.
To be sure of what you are getting just look at the labels. Shareware is most often evaluation only. You need to register and pay after the evaluation time, or choose not to pay and get ads in the software. Freeware should be completely free and doesn't need an evaluation period.
It might have advertising, but more common nowadays are voluntary donations which help support the software. The safest route is to just do a little homework before downloading software, and don't download anything suspicious.
NoAdware will destroy all traces of unwanted and nasty ads that have infected your computer. Use it now to make your computer adware free.