Pokoj is usually a living room (= "obývací pokoj", "obývák") or a child's bedroom (but not the main bedroom, which is "ložnice) or a guest room... or any undesignated common room in a house/apartment. It's also a hotel room.
Místnost is any room whatsoever (in the sense of "enclosed quarters", not in the sense of "space" - that would be "místo" or "prostor"). -- A kitchen is not a pokoj, but it's still a místnost. A room in an office is a místnost, but not pokoj. Místnost is the hypernym of pokoj.
One of my friend's explained pokoj to me like this: when you're a kid, and you have a friend over, you "go to your room," or pokoj, to hang out. Yeah, you have a bed in your room, but it's also where you end up spending most of your free time indoors. It's where you do your living, it's your own space. (Whereas adults tend to have a separate bedroom, or ložnice, that is for sleeping, not for general living.)