It depends on what type of fill valve you have, Sam - however if you study it, as the water rises, it carries some sort of floating device with it. This could be a white plastic cup (upside down), a plastic ball or even a square float that rises up a plastic column....either way, there is usually a screw or similar mechanism that you turn, that lowers the float, making the water turn off sooner.
John
May 2009