There are three major groups of language proficiencies in the core rules.
Languages, Modern are any languages spoken on the planet in modern times. Typical languages are Gnomish, Dwarven, Elven, Eastern Common, Western Common, and the like. They are general proficiencies, and take one slot each. You must specify a language when you take this proficiency. In general, most characters are given the ability to speak (but not Read/Write) their local language as a bonus by the DM. A second proficiency slot must be invested in a language if you want to also Read/Write that language.
Languages, Ancient are any languages which are no longer commonly spoken on the planet in modern times. There are ancient forms of elven, ancient draconic, and several different ancient commons. Ancient Eastern Common in particular is frequently used in Heraldry, similar to Latin in our world. Most people in places like Misty Cross are assumed to know a little bit of it because the city uses it all the time. Ancient languages take two slots, or one slot for mages and priests. A second (or third) proficiency slot must be invested in an ancient language if you want to also Read/Write that language.
Languages, Obscure, are any languages which either were never commonly spoken on the planet or were intentionally invented as secret battle languages or cyphers. If a character joins a guild with a secret language, it counts as a modern language, because s/he learns the language as a guild member. If s/he must learn it from books and study, it is treated the same way as an ancient language: taking two slots, or one slot for mages and priests. Most Obscure languages have no written form, but proficiency usually includes it.
"Typical" (if an obscure language can be said to be typical) obscure languages include very specific dragon languages, far outer planar languages, the secret tongues of secret religions or brotherhoods, the family languages of some powerful clans and several invented codes. A modern "obscure" language might be Esperanto or Klingon. An example in fiction might be the House Battle languages in Dune. Alignment languages, when allowed, are often obscure languages, but because of their special rules, they may not be allowed.
Obscure languages require talking with the DM, because you have to explain why you have it, what it is and where it comes from. Translating from an obscure language without "Read Languages" or "Tongues" can be impossible in some situations.
Edit: I thought that obscure languages required an additional proficiency for read/write, but I was incorrect. It is assumed you get both (in the rare instance where both exist.)