Take a torch and look at the old one. See how long it is and if it is attached to a pipe from the side of the cistern (like the one in my picture). Measure its length. It may be made of brass or plastic. If it is brass you will need a new plastic float as well, if plastic you can re-use the old one. Observe the various nuts and consider if you already have an adjustable spanner to fit.
I call it a ball-cock. People who are embarrassed to mention "balls" or "cocks" may call it a float valve.
Make your way to a plumbers merchant, DIY store or ironmongers. Try to get one the same length as your old one, although if, when you were measuring, you saw you had plenty of room, a longer one will be OK.
Take the new one home and tinker with the nuts until you understand how it is fitted, and with the adjusting screw until you understand how the water level is set. Then turn off the water supply and remove the old one, fit the new one, turn on, and see if you have any leaks.