What is MP4?
The container video actually travels in: what phones record, what messaging apps accept, what every player since the iPod era opens. It usually carries H.264 video and AAC audio. Its one structural quirk matters to converters - the index of every frame lives in a table that has to be exactly right, or nothing plays.
What is GIF?
Thirty-five years old and still everywhere, because it does one thing nothing else quite does: animate inline, silently, in any context that displays an image. The cost is a 256-colour palette and no real motion compression, which makes GIF a poor way to store video and an excellent way to send a three-second loop.