To answer your question, you first have to understand how IP addresses are allocated. (Note that this is a overly simplified version intended to be understandable with little background knowledge, and is not very technically accurate)
For example, if you are using private address space: 192.168.1.0 to 192.168.1.255:
192.168.1.0 represents the network
192.168.1.255 represents the broadcast address
192.168.1.1 to 192.168.1.254 are usable addresses for computers
Quite often, 192.168.1.1 represents the router, and thus, you have 192.168.1.2 to 192.168.1.254 on your disposal.
In this case, you have:
default gateway 192.168.1.1
the netmask, ... (when expanded in binary), indicates that in an arbitary address, no matter what you put in the '0' part, you are still within your network provided that the '1' part is equal.
Thus, 192.168.1.24 is in the network 192.168.1.0/255.255.255.0 whereas 192.168.2.24 is not.
In a home router network connected to an ADSL modem, the usual default gateway is the router itself, and the network mask is usually 255.255.255.0 (i.e. a class C network). Some routers do use 10.0.0.0/255.255.255.0 though.
In a leased line environment, usually you will be assigned, e.g. 4 address (one router, one broadcast and 2 usable), from, let's say, 126.96.36.199 - 188.8.131.52, then the default gateway is usually 184.108.40.206, and netmask 255.255.255.252 (i.e. 255.255.255.) and broadcast 220.127.116.11.