The problem could be a stuck/broken sending unit, bad wiring or a problem with the gauge itself. That is also the order of likihood....
The sending unit mounts to the top of the tank. It usually is a metal plate that is about 2 inches in diameter and held down with about 6 small screws. There is one wire to a center terminal and probably a ground wire to the metal plate.
There should be access to the top of the tank where the sending unit is located, but you might have to remove a seat or floor panel to get at it.
The first diagnostic step is to remove the center wire. Turn the ignition on. With the wire removed the gauge should be "pegged" fuller than full or beyond empty (no wire is usually empty). Now touch the wire to the metal frame, the gauge should peg the opposite direction.
If the gauge moves as described then the gauge and wiring is okay, so the problem is in the sending unit. Remove the six screws and pull the sending unit out of the tank. It won't pull straight up, you will need to work the float assembly out the hole.
Once you have the sending unit out take a close look at it. It should have a frame that extends half the depth of the tank. An arm pivots off the bottom of the frame. The arm has a float on the end of it. If you move the float up and down the arm should rotate a shaft that goes up the frame to the sending unit.
It is common for the sending unit to fail either mechanically or electrically. If it isn't working right, don't bother messing with it just go buy a new one. Before you head to the parts store measure the depth of the tank as the sending units come in different size ranges. They are all adjustable but you need to buy one that has the correct range.