Bike transmissions have drum with pins and a double ended pawl that rotates the drum by the pins. The drum has cammed grooves in it that move the shifter forks which in turn slide the gears in and out of engagement. When it gets stuck in highest or lowest gear, normally the pawl has screwed up in various ways. If tapping on it or trying to turn the shifter shaft (this has the pawl on it) won't do it, you'll have to pull the side cover. Normally this is a pretty easy procedure on most bike, and fairly risk free. You must have oil and a new gasket ready beforehand, and if the screws are Phillips you will need an "impact driver" which is normally available in the tool area in a bike shop.