With the proliferation of motion graphic software and the abundance of movies that are set in fantastical or imaginary worlds, most visual effects are done in post-production. Footage is green-screened and then the sci-fi interfaces or strange landscapes or monsters or whatever are added afterwards. Just look at the The Avengers movie, whose spectacular FX reel showcases Industrial Light & Magic's expert tinkering. Or the new Iron Man 3 film which the director says "has as many, if not more, visual-effects shots than Avengers."
But while CGI undeniably allows for scenes which might be impossible to film, there's another way of doing FX. And that's using in-camera special effects, which are essentially created in front of the camera rather than added in post. A recent example of this is the effects created for Oblivion, directed by Joseph Kosinski and starring Tom Cruise. The effects weren't exclusively in-camera, but where possible these were used as much as they could to add a certain visual integrity to the film's aesthetic.