It may be damaged in some way and needs to be replaced. Unscrew the damaged float ball and take it to the hardware store to match it up with a new one. You may need to bend the float arm that the ball is attached to which allows the ball to float to the top. If none of the above is the problem, it may be the ballcock or the entire mechanism. If the toilet keeps leaking it may mean that there is some sediment in the valve body or that it is worn out.
Hardware stores carry entire kits of replacement parts for the toilet tank.
You will get complete instructions with the kit that are fairly easy to follow. Your first instructions will be to turn the water off under your tank to stop the flow of new water. Put a bucket under the tank to catch the small amount of water left in the tank. Unscrew the nuts that are connecting the riser tube under the tank. Loosen the nuts and screws on the inside of the tank and pull out the ballcock, take it with you to the hardware store to get a new one.