The site mentioned above looks good, and I'd check it out. But in brief, an IP address has two parts - the network address and the host address. The number following the slash is the number of bits used to identify the network number, counting from the most significant bit. Since the full address always contains 32 bits (written as four decimal numbers separated by dots), 32 minus this number tells you the number of bits available to identify hosts on that particular network. For example, the network 10.0.0.0/8 indicates that the first 8 bits make up the network address, leaving 24 bits for identifying host. This network would have 2^24 host addresses available. In reality, though, the first and last address in that range are not available, as the first identifies the network number and the last in the range is used for broadcasts to the entire network.
Mathematically, if you AND the IP address of a machine with the network's subnet mask, the result is the network number. Subtracting that result from the address yields the host number. The subnet mask consists of as many 1s as the slashed number, starting from the left. If you have a network of 192.168.0.0/16, the subnet mask is 11111111.11111111.00000000.00000000 or 255.255.0.0 in decimal notation. This network has available 2^16-2 = 65534 addresses for hosts. The IP address 192.168.0.0 is the network number, and 192.168.255.255 is the broadcast address.
Subnetting is handy for breaking up large networks. Suppose that you have a network, 192.168.0.0/16 that you want to break up for management purposes. Using a subnet mask of 255.255.192.0 on all the hosts breaks them up into 4 subnets, as you've borrowed 2 bits of the hosts address range to create subnets. Now you'll have 192.168.0.0, 192.168.64.0, 192.168.128.0, and 192.168.192.0 internal segments each with 16382 host addresses available.
I hope this is helpful... But do go through the tutorial on the site above.