How to share an internet connection in OS X

Getting your Mac online is generally quite straightforward, especially if you run your own AirPort network or connect through a USB or Ethernet cable directly to a router or cable modem.