Yo me alegro de no estudiar: la mejor escuela es el teatro.
(Literally?!:) I am glad to not study: the best school is the theater.
Why is de used in this example? Is que (that) a reasonable alternative?
Prepositions in both languages are not equal, it is a nightmare for Spanish people to learn English prepositions, and viceversa can happen the same ;)
If I give you the case
The literal translation would be
As you see estudiar on his infinitive form is preceded by de and in English, gerund is preceded by of.
A trick is mentioned http://spanish.about.com/
The person who/that found me was very kind --> La persona que me encontró era muy amable.
The students that study will pass the exam --> Los estudiantes que estudien aprobaran el examen.
In the case you mention, "Alegrarse de" it's one of the ways of using the verb. It would be the equivalent of "Being happy about".
As far as I understand, its akin to the phrasal verbs in English.
You wouldn't be happy OF something, but you would be happy about, for, that, etc.
In any case, "de" is one of the most complicated prepositions to learn, as it is used in a loooot of cases. Check the list of uses (as preposition) listed by the Real Academia dictionary:
Don't worry TOO much about it, you will be learning the use slowly :) The first THREE definitions given there cover most cases, in case you want to learn those first.