From Middle Korean은〮/ᄋᆞᆫ〮 (Yale: ún/ón), from Old Korean隱(*-(u)n). Attested since the very beginning of Korean writing in the first millennium. The post-vocalic form 는(neun) is probably formed by pre-Middle Korean reduplication, with the original form ㄴ(n) now relegated to colloquial speech.
은(eun) can appear after bare nouns and pronouns, adverbs, certain verbal connective suffixes (e.g. 면(myeon, “if”), 어서(eoseo, “and then”)), and most case-marking particles. It is not compatible with nominative case markers 가(ga) and 이(i), or with accusative case marker 을(eul); if a noun in the nominative or accusative is topic-marked, the case-marking particle cannot appear.
The distinction between topic-marking 은(eun) and subject-marking 가(ga) and 이(i) is often difficult for non-fluent speakers. Essentially, 은(eun) is explicitly topicalizing, i.e. marking previously known information as the topic to which the new information in the subsequent statement applies, while 가(ga) and 이(i) (by virtue of not being explicitly topicalizing) has a focalizing connotation, i.e. marking the preceding word as new information introduced into the discourse. Compare the context of the following:
The newly introduced focus is the person who has come.
Accordingly, 은(eun) can only be used for a topic that is already shared knowledge to both discourse participants. In the first example below, topic-marked 오빠는(oppaneun) is ungrammatical because the identity of the person is not shared knowledge prior to the conversation. But once the presence of the older brother is shared knowledge, topic-marking can be used:
Why is your older brother calling in the middle of the night again?
Similarly, the use of 은(eun) in statements of general fact can be explained by the fact that the existence of e.g. Korea or the sun is already common knowledge to all discourse participants.
When a topic-marked word or phrase is at the beginning of the sentence, it is most commonly intended as either the topic or the background information of the rest of the sentence. When it appears within a sentence, it is almost always contrastive or emphatic.