lack of oxygen and no cool down. Make sure you cool down right and let your blood return and your heartrate come down before you shut your system off.. really important.....
dehydration, IMO, is the most common cause of this.
quick change in temp, ie no cooldown, is a possibility.
improper breathing, which causes lack of oxygen stated above, and just sheer fatigue. if you've done a real hard set of squats, breathed properly, and still thrown up all over the floor you know what i'm talking about here.