There are several things that could have gone wrong, some listed in previous answers. But one question to start with: What sort of shifter do you have? Shimano SIS is normally a thumbshifter but your description sounds as though it might be a twist grip or push-button shifter. The problems for each can be slightly different.
All of the following will be easier if you can lift the rear wheel off the ground so that you can spin the pedals and change gear while you experiment. Flipping the bike upside down so it's resting on the saddle and handlebars is sometimes the only way to do this.
Since you have more than one gear working, the cable moves in the housing and is probably still intact. It may have frayed at a bend and be jammed up, with just enough movement to let you use two gears.
- If your bike has suffered an impact there may be obvious damage - a bent derailleur or broken shifter. This should be obvious.
if there is exposed shifter cable along the frame tubes, try pulling on that while gently spinning the pedals. Be careful because if the derailleur is bent this may cause it to move into the rear wheel, potentially damaging the wheel or derailleur. The gears should change. Work out which cable changes the rear derailleur and see if that gives you the full range of gears.
- If so, it's probably the shifter,
- If not it's probably the derailleur.
- If the cable pulls right out of the bike, the cable is broken.
Next, shift to the lowest gear you can, stop the rear wheel, and pull quite hard on the cable. With thumbshifters and twist grips, pull hard enough so that the gear lever moves to the highest gear. With rapidfire this won't happen so just pull as firmly as you think is reasonable. This does two things: if the cable is frayed, it will hopefully snap; if there's a sticky point somewhere in the system, it will probably give way.
If the problem is just the cable sticking in the housing and you don't want (or can't afford) to replace it, lubricating the cable will often solve the problem for a while at least. Most solvent-based chain lubes will do this just fine. Thereś a video at http://bicycletutor.com/lube-brake-shift-cables/ showing exactly how to do this.
A bent derailleur can often be straightened, and with a 6 speed, if it looks straight it usually is. If you break it off while bending it back you haven't lost much, since the alternative is buying a new one. If it does bend back you win.
If the derailleur just won't shift far enough any more, you'll need to check for more subtle problems. I'm not sure I can talk you though those.
If the thumbshifter is broken, you need to replace it.
If it's a broken cable, the Park site @Jay Bazuzi linked to will show you how to fix it.
The easy option is, of course, to take it to your LBS. It should take the mechanic about 30 seconds to work out where the problem is, and they will either bend the derailleur back or replace the broken part. Unfortunately old, cheap gear systems are usually not repairable or worth repairing. The good news is that replacements are cheap. The bad news is that if you bought the bike second hand, new replacement parts will probably cost as much as the bike.