In a nutshell,  here are the main differences between a  GIF and MP4 file : 

MP4s are a video file. These are perfect for sharing

Whereas GIFs are animated images compressed into frames that loop around which give them that "repeated" effect.

Example of a GIF: