The Expansion Pak consists of 4 MB (4,194,304 bytes) of random access memory (RAM)—which is RDRAM, the same type of memory used inside the console itself—increasing the Nintendo 64 console's RAM from 4 MB to 8 MB of contiguous main memory. It is installed in a port on top of the console and replaces the pre-installed Jumper Pak, which is simply a RAMBUS terminator.
The Expansion Pak is required for two retail games: Donkey Kong 64 and The Legend of Zelda: Majora’s Mask. Some other games, like Rayman 2: The Great Escape are capable of using the Expansion Pak if available, but do not require it.
Details of how the Expansion Pak is detected are in the RDRAM article.