It's very common to have times when no hot water is available; maybe the water heater is malfunctioning or has been turned off, or too many people are trying to use the hot-water supply at once. But it is also possible to have the opposite problem: no cold water and all hot water, which can be very uncomfortable if not outright bad for your skin. Sometimes this is a temporary issue due to normal plumbing processes, but other times there are additional factors at play.
The Toilet Flush
A short burst of hot water that gradually subsides within a few minutes is usually due to someone turning on and drawing from the cold water supply by a large amount. A toilet flush is a typical example. When someone flushes a toilet, the water that refills the tank is from the cold-water supply. The large amount suddenly moving toward that one fixture means there's no cold water moving toward your sink or shower, so all you get is a burst of hot water. The water temperature gradually gets back to normal in a few minutes.
A Heat Wave
Go to any really hot part of the country in summer (e.g., central Arizona, Oklahoma), and you'll find that people expect nothing but hot water then because the heat is so bad that water pipes and supplies stay heated throughout the region. All water enters your house as "cold" water, and the heating is supposed to take place at the water heater. But if you live somewhere where triple-digit temperatures are normal, the entire area acts like a preliminary water heater. It's not unusual to turn on the cold water and scald yourself.
There's not much you can do to make the water actually cold, but you can cool it down. You need to get water moving through the pipes so that the really hot stuff clears out. Run your shower or faucet for a few minutes to let relatively cooler water (which may still be warm) flow through the pipes.
A Pipe Leak
This one is urgent. If your cold water has become nonexistant, and you just can't get it back even if you're not in an area where the outside temperature, you need to call a plumber and have them look for a leak. It might not be a visible one, but you've got something severe enough to limit your cold water.
If you can't detect seasonal or other patterns in the lack of cold water, calling a plumber is your best bet. You can't let the problem go on for long without a solution.