rehash updates FreeBSD’s path environment variables. When you have installed new port you may not be able to run the executables without specifying the path.
rehash solves your problem most of the times when you using csh, tcsh or zsh shells. But there isn’t rehash command for bash shell:
$ rehash rehash: not found
And you should use hash instead:
$ hash -r
Also hash command works in ksh, zsh, sh shells.