I've done this before. Stay calm. Get dish soap(any soap will work) and rub it on a wet cloth. And put it on the spot until it comes off. Don't give up, it will take at least 5-10 mins to fix the stain?
Water, hairspray and rubbing alcohol. You can also try hydrogen peroxide however, the first three worked for me. You can get the complete instructions by accessing www.howto.com and type how to remove nail polish from rugs in the search box. Do not use bleach.
If these suggestions fail to remove the stain or even worse melt the carpet (because only one suggestion comes close to being correct). Then use a box cutter and cut as small a piece of the carpet out as needed to remove the stain. Cut it in a square (no odd shapes). Note it's orientation (NSEW). Then go to a closet with the same carpet and cut out a piece of unstained carpet the same size. Vacuum out all the dirt and dust from both holes and put duct tape around the edges of both wholes, sticky side up. Position the tape so half the width is on the existing carpet and the other half will contact the cut square. Now put the stained piece in the closet and the clean piece where the stain was. Make sure the carpet orientation is the same. Press it down firmly and vacuum again to hide the seam.
Once in high school my friend was house sitting and spilled nail polish on the peoples floor we dabbed it with nail polish remover but that didn't get it all up it was mostly only on the top of the carpet so I had the idea to to a razor (like for shaving your legs) and shaved the top of the carpet. IT WORKED!!! You could barley see the stain after and the people never asked her about it.