It is a possessive particle. Don't think too hard it is very easy particle to understand and use.
"Possessive" means that the left part is the possessor, the right part is the possessed.
For instance :
저의 신발 (my shoes)
The possessor is 저 (I). The possessed is 신발 (shoes).
literally : the shoes of me
If we take your examples :
최고의 선생님 (the best teacher)
literally : the teacher of the best
사진이나 음악 등의 컴푸터 파일 (picture, music and such computer file(s))
literally : computer file(s) of picture, music and such
Hope you understand the logic a bit better.
파이팅 ! :)