When you dial your modem to an ISP, and it connects to their modem, the kernel doesn't just shove IP packets through it. There is a protocol called `Point-to-Point Protocol', or `PPP', which is used to negotiate with the other end before any packets are allowed through. This is used by the ISP to identify who is dialed up: on your Linux box, a program called the `PPP daemon' handles your end of the negotiation.
Because there are so many dialup users in the world, they usually don't have their own IP address: most ISPs will assign you one of theirs temporarily when you dial up (the PPP daemon will negotiate this). This is often called a `dynamic IP address', as separate from a `static IP address' which is the normal case where you have your own address permanently. Usually they are assigned by modem: the next time you dial up, you will probably get a different modem in the modem pool, and hence a different IP address.