To set using command (temporarily)
ifconfig interface inet IP
eg: ifconfig lnc0 inet 192.168.1.2
lnc0 --> interface name which can be obtained using ifconfig -a command
To set permanently
vi /etc/rc.conf
hostname="linux4starters.com"
ifconfig_lnc0="inet 192.168.0.3 netmask 255.255.255.0"
Run /etc/netstart script.