Essentially there is no difference between the MPG format and the MPEG format. However, certain websites, such as YouTube, don't accept uploads in the MPG format because it is an older standard. The reason for the difference is that a three-letter file extension was required in older versions of Windows, so MPEG was shortened to MPG.
MPEG stands for Moving Picture Expert Group. There are several versions of the codec, otherwise known as the compression algorithm, used to reduce the size of a file for quicker streaming or downloads. MPEG-1 and MPEG-2 are standard video and audio compression formats and are of a higher quality than most MPGs. MPEG-1 is also most commonly associated with the MP3 audio format. MPEG-4 allows streaming over the Internet and is typically associated with Apple's Quicktime player and format.
The way the compression formats work is by removing nonessential components of the file without reducing the visual quality. They rely on retaining key frames and letting the system fill in the gaps. If a video has 25 frames per second, removing a nearly redundant frame or two reduces the file size and is imperceptible to the viewer.
Other available video compression formats include AVI, MOV, WMV, ASF and DIVX.