When clients are deploying an unpublished supplier or customer application to the Internet for the first, they are always amazed at the sheer number of random attacks. Granted many of these are looking for PHP pages or some other long ago patched vulnerability. The question that always arises is "How did they find the server so quickly?" Well, the hackers are just searching blocks of addresses on a continual basis.
The IPv4 address space is over 4 billion addresses (255*255*255*255), but in reality only a small portion of it is actually meaningful. A very nice graphic representation is here and the original comic version is available here.