From Gamehiker Wiki
The Expansion Pak was an accessory for the Nintendo 64 that increased the 4 MB of RAM to 8 MB. It plugs into the front of the Nintendo 64 console. The default Jumper Pak is already pre-installed in the same position so the Expansion Pak comes with a little plastic key to aid in taking out the Jumper Pak and replacing it with the Expansion Pak. It was included in every copy of Donkey Kong 64 as it was the first game where it was necessary in order to play. The only other game where an Expansion Pak was necessary was The Legend of Zelda: Majora's Mask. It was highly recommended in order to properly play Perfect Dark and Starcraft 64 as without it, a majority of the content was unavailable to the player. In Japan, both Majora's Mask and Perfect Dark were available as a special edition that included the Expansion Pak. The Expansion Pak also allowed for some games to display higher quality graphics such as in Star Wars: Episode I Racer or Star Wars: Rogue Squadron.