The netblock has a registered location, usually the location of the 1st level switch at the ISP. The site can then parse this info and figure out an approximate location for you.
If you live in a very remote area (but still somehow have broadband), the location can be quite far off. If you have dial up, the location will probably register as the dial hub location.