"이/가 and 은/는"
How to use these particles is a quite involved subject and you can't understand all of it just by reading a few paragraphs. It is deeply integrated with the rest of the language. You can fully master it only when you get to a fairly advanced level of comprehension.
Still, here's a simple introduction that might help.
The basic rule is that 은/는 is generally used to talk about a *main*, important *topic*, relating new, *open* information. 이/가 on the other hand is more for supplying a *specific*, *closed* fact, in a *subordinate* role.
This "main" and "center stage" versus "subordinate" and "support function" is not without exceptions and sometimes the distinction is blurred, but it is generally the most important criterion. Examples are best for understanding this:
- 나는 이 학교를 다녔다: You want to talk about some new fact about 나, the main topic, so 는.
- 이것은 내가 다닌 학교다: The topic/subject is 이것(so 은); "내가" is in a sub-clause modifying 학교 in a supporting role, so it takes 가. "나는 다닌 학교" doesn't make sense.
AA: 누가 숙제를 다 했어요? Speaker wants to know a specific closed fact- WHO did it. He is not intending to discuss new things about that person, so the subordinate and closed 가.
BB: 영수가 댜 했어요: Same. A specific single fact is given as an answer to a question asking for it.
AA: 철수는 아직 못했나요? Here the speaker is drawing attention to a new person, so that person becomes the topic and takes the center stage, so 는.
For this reason, in subordinates phrases, it is typically 이/가: 내가 너를 좋아하는 이유, 내가 읽던 책, 정보가 중요한 시대, etc.
On the other hand, when you talk about something new or important, it is usually with 은/는: 나는 네가 좋아, 난 회사 그만 두기로 했어, 너는 성격이 참 좋다, 그 애는 죽었어.
Knowing this basic principle is a good start for beginners.