Jein (Ja + Nein).
"of" is "von" but only people who speak a strong dialect or just bad German or people who consciously want to sound like that to give a joke that certain touch use it in the sense of possession for shorter nouns and persons.
E.g.: "Johanns Katze ist schwarz." - "Des Johanns Katze ist schwarz." - "Die Katze von/vom Johann ist schwarz." - "Dem Johann seine Katze ist schwarz."
These are all ways to talk about the fact that Johann's cat is black, and it is very likely that the Germans will understand you, no matter which version you use. The first is a good normal High German both written and spoken. The second is the (correct) genitiv which is about to die out. (look at: "Der Dativ ist dem Genitiv sein Tod" (The Dative is the death of the Genitive) book series by Bastian Sick) and therefore hardly used anymore. The third can occur in some regions or subcultures (that are for example not native Germans), and the fourth is absolutely dialect-specific/regional (Hessen, Ruhrpott, Berndeutsch, etc.).
Of course, the sentence construction, the phonetics or the length of a word can ensure that one variant is preferred to the other or that it is a matter of fixed expressions.
"Münchens Kirchen sind schön." <-> "Die Kirchen von München sind schön."
(="The churches of munich are pretty.")
"Die Qualität des Wassers ist gut." <-> "Die Qualität vom Wasser ist gut."
(="The quality of the water is good.")
The first ones would be preferable (especially in written german) , the second ones are dominant in some regions like e.g. bavaria.
"Die Spitze des Weihnachtsbaums ist gerade." <-> "Des Weihnachtsbaumes Spitze ist gerade." <-> "Die Spitze vom Weihnachtsbaum ist gerade." <-> "Die Weihnachtsbaumspitze ist gerade."
(="The top of the christmas tree is straight.")
The first two variants are both genitive but the first sentence is much more common than the second one. Again the "von"-construction is regionally very dominant but not welcome in written german. I added the last sentence to show an example of the possibility to combine nouns to a new compound word. You can do that with words of any length. The longer the word, the less likely it is to be found in everyday German, though.
Hope this little excursion was interesting for learners and not just too.. much(?).
Yes, it's a different word.
a teacup = eine Teetasse; a cup of tea = eine Tasse Tee
a wine glass = ein Weinglas; a glass of wine = ein Glas Wein, etc.
To explain to beginners
Eine Tasse Tee, bitte One cup of tea please
Eine Tasse aus Tee, bitte One cup made of tea
A lot of the Germanic languages don't use of unless its denoting the material of which it is made not the contents.
En kopp te A cup of tea
En kopp av te A cup made of tea