First you need to configure your computer to get a static IP address from your router. Instructions on how to do this can be found here: here
For example, let's say you have chosen iPaddress. After the above step is completed, you can access the website on your local computer by going to "http: // localhost" and "http: // theipaddress", since your computer will always have this IP address on your network.
If you are viewing your IP address (for example, "http://www.ip-adress.com/"), the IP address you see is actually the IP address of your router. When your friend accesses your site, you will give him that IP address. However, you need to tell the router that when it receives a request for a web page, send this request to your server. This is done by port forwarding.
Two examples of how to do this can be found here and here, although the exact screens that you see will vary depending on the manufacturer of your router (Google for exact instructions if necessary).
For the Linksys router I have, I enter "http://192.168.1.1/", enter your username / password, the tab "Applications and games"> "Port range forward". Enter the application name (whatever you want to name), start port (80), end port (80), protocol (TCP), IP address (using the above example, you must enter 192.168.1.102, which is a static IP you have assigned your server address), and be sure to check to enable forwarding. Reboot the router and the changes take effect.
Having done all this, you can now access your web page by going to the web browser on your computer and entering "http://IP.address.of.your.computer" (the same one that you see when you come here).
As mentioned earlier, the IP address assigned by your ISP will ultimately change whether you go offline or not.
Hope this helps.