Runways are numbered based on compass heading.
(Note that within the US, we use MAGNETIC heading; this is not necessarily the case in other countries! (e.g: Canada, which is closer to the north pole, where they use true north to compensate for compass north being off)
(Meaning each physical runway is two numbers!)
The heading of the runway is rounded and truncated to the first two digits; For example, a runway with a heading of 093 degrees becomes runway 9. (Runway 27 from the opposite end).
Now you may ask, what if there are 2 parallel runways?
One becomes runway 9L (left) and the other becomes runway 9R. A third runway would cause one to become 9C (center).
But what if there are MORE runways on the same heading? (Such as the 4 at Harstfield-Jackson International Airport in Atlanta?)
In this case, the airports will typically change the number of the runways by one, even though the actual heading of the runway may be no different! (For example, you would now have runways 8L, 8R, 9L, and 9R that are all parallel.
Wouldn't this cause problems with pilots not knowing the actual heading of the runway though?
(Remember that the headings are rounded, and based on magnetic (less accurate) headings!)
One of the pieces of information about airports that is published on charts and such is the actual heading of the runway.
Grass runways are suffixed with a G (E.g. 12G), although since a pilot usually isn't going to have any trouble identifying a grass runway the G is not usually marked. I can't speak to the numbering of water runways; I have limited experience with amphibious aircraft, and I find it highly implausible that they paint the runway numbers! ;)