What's the best way to fix up my used bike?
Simple adjustment

It may be that your brakes and gears are simply out of adjustment. The easiest way to confirm this would be to take it to your local bike store (LBS) and ask them for advice. Most stores are pretty friendly and helpful towards keen amateurs.

If they advise that it's just adjustments they can do it themselves, or show you the adjustment screws so you can try it yourself.

More significant work

It may turn out that there is more work required, such as replacing brakes or gears. Also the chain, cassette and chainrings may need replacing.

In this case I'd be very wary of investing too much money into the bike. Buying components individually is a lot more expensive than buying a complete bike. Plus making sure parts will fit can be confusing and unreliable. If there's much wrong with the bike I'd say it'd be cheaper to buy a new bike where you know that all the parts are at least compatible and in good condition.