hi, if you follow the cable to the derailleur at the back and look where the cable goes into that part you should see that its held on with a bolt, now just before this bolt their should be an adjuster that you can turn to tighten the cable a little bit, you know where the black outer cable goes into the derailleur at the back their should be a little screw in adjuster you can screw this out and this will tighten the cable.
how ever if you dont have this then change the gear so its on the lowest gear (the smallest cog at the back wheel) then if you undo the bolt on the back derailleur that is holding the cable if you undo it slightly you should then be able to push the derailleur up slightly and pull some of the cable through when you have pulled some of it through tighten the bolt back up and then give it a try, before you tighten it up make sure the little adjusted is screwed in all the way then when you have tightened the cable up you can then adjust it further using this adjuster on the end of the cable.
now the only other problem you may have with the gears is that over time the gear cable becomes weak and therefore goes stretchy this can cause the gears to be loose and not change correctly so if the gears dont work after adjusting then this would suggest you need to get new cables for the gear system.
CLICK HEREthis link will show you how to replace a cable so it will tell you and show you what i have just told you.
let me know how you get on or if you need further assistance ok