You're after the PATH variable. In a terminal window type the following to see it:
echo $PATH
To edit it, open up the file ~/.bash_profile and do something like:
export PATH=/opt/local/bin:$PATH
I've just appended /opt/local/bin to the beginning of my path.