From any directory you type pushd followed by the directory you want to go and popd to go back

For instance: pushd /etc will move you from your current directory to /etc.

popd will move you back to the previous directory.