Click

->System Preferences -> Network.
Choose the interface (wireless or ethernet).
Click the Advanced button.
Click the TCP/IP tab.
Choose DHCP for automatic IP address, or "Manually" to pick it yourself.
If Manually, enter your IP address, your subnet mask, and your gateway address, along with the proper DNS info. Usually, best to leave all this at DHCP, and let it take care of that for you.