It's a practice that gamers were taught since the days of the Atari 2600, and it became quite the prevalent act during the "Nintendo vs. Sega" days of the gaming industry. It was a habit that rose from necessity, primarily the need for one's cartridges to work on a consistent basis. It was also a practice that I later learned was a quick fix that led to the early demise of some very unlucky game cartridges.
The practice of blowing into a video game cartridge was so commonplace that it was widely accepted as the go to method for cleaning games by many gamers. it was so well received that I would buy the canned air computer cleaner spray sold at Radio Shack to clean my cartridges. I learned, however from multiple sources that the moisture and particles contained in a person's mouth could typically settle on a cartridges, which would eventually lead to those contacts tarnishing the same way old silverware and copper does. that tarnish could actually rub off the cartridge and severely damage the connections in a console, which is why so many folks have NES consoles that won't play any cartridges.
Another widely held myth (and one that I followed myself in my childhood) was that rubbing alcohol could work as a cleaner. The most obvious response to this is that it doesn't work, and it could do serious damage to your cartridges to your cartridges. I mean, the waring label on the back of the cartridges says do not clean with alcohol.
You may be wondering what your options are, and they are actually quite plentiful. one option is to use a non bleach or ammonia based all purpose cleaner to swab out cartridges. It is generally non abrasive and the contacts are cleaned without doing irreparable damage to them. Another I recently learned of is the eraser method. You'd need to open the cartridge, take a clean pencil eraser, and gently brush the cartridge contacts. This method makes me a bit nervous, since there something basically scraping the contacts of a game cartridge that in some cases cannot be easily replaced. One other unlicensed method of cleaning cartridges involves using a clean cloth or paper towel and polishing them with a small amount of Brasso. the trouble with this one is that there is no information on whether the metal polish would harm the non metallic portions of the cart if it got on them.
Several companies released cleaning kits for cartridge based consoles in the 80s and 90s, but that resource isn't as plentiful as it once was. Unopened cleaning kits, especially officially licensed ones, fetch some pretty steep numbers among the collecting community, but since the cleaning solution included in these kits was pretty much a tiny bottle of 409, all you need is a few cotton swabs to complete the kit.
Also, in the event that you have properly cleaned your cartridges and your NES still doesn't play them, there may be an issue with the 72 pin connector that allows the NES to play the games. Thankfully, this is an easy fix and can be replaced with another connector. They're typically sold on Ebay and Amazon for somewhere between $3 and $5. once replaced, pretty much every game from that console should work on an NES with a new 72 pin connector.
Remember kids: Don't blow in your cartridges...it does harm than good.