Video containers

Video files are marked with various file extensions. A video format is not the same as the that it contains. This means a video file marked .mkv does not gaurentee that the video format for that video is the same as another .mkv.

MKV
Seems to be the most common file you'll see online when downloading videos, probably because it's freely licensed and not encumbered with patents. They're named "Matroska" from the Russian hollow dolls that open to reveal another smaller doll. Often contains the high definition h.264 video codec and audio channels encoded in Dolby Digital AC-3 (but not always)
MP4
From the same people who invented MP3. Contains high definition h.264 video with AAC audio channels. Playable on the vast majority of devices
AVI
Made by Microsoft and popularized in the 90s. Usually not suitable for portable high definition
DIVX
Evolved out of a hacked version of AVI. High definition DIVX used MKV containers to separate themselves from .divx extension. I used to avoid MKVs years ago because of this, since at that time not many devices supported DIVX and attempting to install codecs led to malware and phishing attempts

Remuxing

The purpose of this is to understand that it's super easy (barely an inconvenience) to get that MKV to play on your iPhone or whatever. The vast majority of MKV video today actual contains the the exact same video and audio codecs that are found in the near universal MP4 video files, you simply have to "remux" those MKV into MP4 which barely uses any CPU resources (as opposed to re-encoding an entire video).