(from): English “from” is generally expressed by means of von, but aus is often used with geographical names. One uses von when both the places “from which” and “to which” are given: Dieser Zug fährt von Köln nach Hamburg. – “This train goes from Cologne to Hamburg.” If the further direction is not given, aus is the normal choice: Dieser Zug kommt aus Köln. – “This train is coming from Cologne.” The phrase: Dieser Zug kommt von Köln is not wrong but has a colloquial ring to it.

(of): The preposition von is used to replace possessive and partitivegenitives, sometimes also genitives with prepositions. Such replacement can be obligatory, optional, or restricted to the colloquial register:

It is obligatory if the genitive cannot be expressed grammatically, which is the case with common nouns not preceded by any declinablearticles, determiners, or adjectives: die Rechte von Kindern (“children’s rights”); der Geschmack von Käse (“the taste of cheese”). It is also true of most singularpronouns and all personal pronouns: der Geschmack von diesem (“the taste of this”); ein Freund von mir (“a friend of mine”).

The replacement is colloquial in most other cases. Any possessive or partitive genitive can, per se, be replaced with a von-phrase, which is normal in speech, and virtually obligatory in colloquial speech. In formal writing, however, it is generally considered incorrect and unusual. This is one of the gravest grammatical differences between colloquial and literary German.