How does a server obtain the IP Address of a user?
When you send a request to the server, the server need to know where to answer, it's with your ip address. This is directly based on the TCP/IP protocol and in a lower level than web servers.
For the reason why Firebug doesn't show your IP address, it's like when you receive mail (paper), you have your address written in front, and the sender in the back. Firebugs shows you the content of the letter, not the sender and the receiver address (IP in IT).