From even its earliest days, films have used visual magic ("smoke and mirrors") to produce illusions and trick effects that have startled audiences.
In fact, the phenomenon of persistence of vision (it was first described to some degree in 1824 by British physician Peter Mark Roget) is the reason why the human eye sees individual frames of a movie as smooth, flowing action when projected.
The earliest effects were produced within the camera (in-camera effects), such as simple jump-cuts or superimpositions, or were created by using miniatures, back projection, or matte paintings.
Optical effects came slightly later, using film, light, shadow, lenses and/or chemical processes to produce the film effects.
Film titles, fades, dissolves, wipes, blow ups, skip frames, bluescreen, compositing, double exposures, and zooms/pans are examples of various optical effects. Cel animation, scale modeling, claymation, digital compositing, animatronics, use of prosthetic makeup, morphing, and modern computer-generated or computer graphics imagery (CGI) are just some of the more modern techniques that are widely used for creating incredible special or visual effects.