Normally, when your computer connects to your network, your router gives it an IP address. Every computer connected to the Internet needs an IP address in order to browse the Web.
Most times, your router just hands out these IP addresses without question to all network clients, so any time a nearby wireless PC asks for an IP address, the router hands one over with no questions asked.