友 can interpreted as
So in which word/sentence/context do I use first and when do I pronounce it as another transcription?
It depends on context: what compound is the character involved in, if any, what are the okurigana and so on.
There are general rules, like lone kanji, or lone kanji word stems, being kunyomi, and kanji compounds being onyomi. These rules are broken. Sometimes kanji compounds have a kunyomi. Sometimes compounds are half onyomi, half kunyomi.
The ultimate arbiter is the "master" assignment of spellings to the vocabulary.
You just know that yuujin is a word, and tomohito isn't. Ah, but, there is a Tomohito surname, and one way to write it is 友人. You would know that from context, and other clues, like the presence of a given name, or a suffix like さん, 様 (sama), 氏 (shi).