CGI is a form of VFX. It is an image wholly done on the computer, whereas VFX can combine images on a set with computer-generated imagery through motion capturing or compositing.