In Final Fantasy VII, most of the equipment you will find on your quest, with the exception of accessories will have slots on them in which you can place various kinds of materia in order to power up your character. Initially, the materia you buy are not necessarily very powerful. But after inserting them into your materia slots, they will gradually gain AP points and level to become more and more powerful.
Red : Summon Materia. When placed into a slot, it allows the character to summon powerful creatures to perform a special attack against the enemy for a certain MP cost. These creatures will get more powerful with the more AP points you have on that materia.
Green : Magic Materia. These materia allow the character to cast a certain spell, depending on the type of magic materia that is inserted. Most magic materia contain more than 1 spell, and you will have access to the more powerful ones as that materia gains AP points.
Yellow : Commmand Materia. Yellow materia gives you commands, or special skills that you can perform in battle, usually with no MP cost. More commands are added as the materia gains AP.
Purple : Independent Materia. Purple materia stands alone, providing a unique ability to the user, whether it be a boost in Stat points, or a faster recovery time, etc.
Blue : Support. This materia is very important, useless on it's own but extending the capabilities of other materia if placed in a linked slot along with it.