To rename a file in the terminal, you're actually moving the file with mv, but you're moving the file from itself to itself with the new name.
This example renames example.txt to file.txt:
$ mv example.txt file.txt
Because they both use the same command, you can combine renaming with moving. For example, when moving example.txt to Documents, you can also rename it:
$ mv example.txt ~/Documents/file.txt