vi is a text editor in linux.
:wq! is the command for write the file and then quit in vi
The reason I wrote them is that if you use alias on the prompt, you will lose it after your next reboot.
So, to make it permanent, it's recommended that you write it in a file called .bashrc in your home dir (if it doesn't exist, then create it).
The .bashrc file is parsed everytime you log on.
Hope this helps