Final Fantasy VII
The Master Materia are the ultimate in Materia accessorising. There are three different varieties of Master Materia - Master Magic, Master Command and Master Summon - and they each contain the magic found in every Materia from that class. So if all three are equipped every spell is accessible to the user.
Access to the Master Materia comes via the Huge Materia which were obtained courtesy of ShinRa and stored in Bugenhagen's observatory. Once there, Cloud Strife can then perform a trade of sorts by using his current Materia.
Mastering The Materia
The more generic way of obtaining the Master Materia is to master all of the normal materia. For example, if Cloud manages to have a master version of every single Magic type, he can then exchange all of these mastered Materia for a single Master Magic Materia. The same theory also applies to the Master Summon and Master Command Materia.
While this means a lot of Materia are lost, the Materia Materia can "give birth" to a new Master Materia if it is indeed mastered itself, just like any other Materia in the game.
How Do You Get The Earth Harp?
The potentially more challenging way of obtaining the three Master Materia is to obtain the Earth Harp. This can be acquired by defeating the formiddible Emerald Weapon in the seas between Junon and Costa del Sol.
Upon obtaining the Earth Harp, it can be exchanged with an elderly man in Kalm. He offers the three Master Materia at no other cost, so the player gets to keep all of their mastered Materia.