According to VES handbook:
Visual Effects (abbreviated VFX) is the term used to describe any imagery created, altered, or enhanced for a film or other media that can’t be accomplished during live-action shooting. In other words, much of the art of visual effects takes place in post-production, after primary image capture is complete. Visual effects can be added to live-action, captured through techniques such as matte painting; rear- and front-screen projection; miniature or forced perspective sets; computer graphic objects, characters, and environments; and compositing of images recorded in any number of ways. The recent explosion in digital tools that make flawless compositing, digital sets, and fully computer-generated characters possible and accessible to moving image makers at all levels has made visual effects a standard part of every moving image maker’s tool kit.
On the other hand, Compositing is the combining of visual elements from different or separate sources into single images, often to create the illusion that all those elements are parts of the same scene.