When you purchase a carpet and put it on the floor, it is only normal to want that it should stay in a good condition. However, stains and spills often happen and these can hardly be avoided. The most important thing about keeping your carpet in a good state is to know exactly what to do when certain accidents occur. You need to act fast and with accuracy if you want to minimize damage on your carpet caused by spills and maintain the health and beauty of your carpet
To begin, a home carpet should be professionally cleaned at minimum once a year. It is true that carpet vacuuming will go a long way to maintaining your carpet in good state, however, this singular action is not enough to keep the carpet looking good. You can get a complete carpet cleaning via the use of appropriate equipment or by using the services of a professional carpet cleaning company. 
Act fast!
Carpet spills and spots should be handled with particular techniques in order to minimize destruction that may result from such occurrences. It can not be over emphasized that you must act on such spills as fast as possible, by cleaning it using some quick remedies. After cleaning the spilled area, it is recommended that the area be blotted with white paper or better still a cloth. This should be followed by covering the area with a cloth that is thick and leaving it on through out the night or for a long while. When this is done immediately the spill gets on the carpet, it prevents it from spreading through out the carpet and hence minimizes damage.  
There are many home solutions that you could easily concoct and use on the spills with great effect and rapid results. The best home products for minimizing the look of such gross spills run the gamut from vinegar, salt, white wine to sodas. Such solutions should be applied in small amounts for the best results on stains. They should equally be applied directly on the affected spot and blotted out gently. Once you apply a little amount of any of these products on the spotted area, wait to see the effects. If the results are good, it is safe to apply the rest of the product on the complete area that has been soiled.
There are varying stains that could cause irreparable damage to your carpet if care is not taken. More serious cleaning is necessary for carpets with stains from coffee, ink or blood.