"The student is not charming."
Translation:학생은 매력이 없습니다.
They are based on the ending character of the root word. If there is no final consonant use "는", If there is one use "은".
학교 + 는 =학교는
산생님 + 은 = 산생님은
Same goes for "이" and "가", except here were have an exception. If the final syllable block is "저" then you use "제", or if the final block is "나" then use "내"
학교 + 가 = 학교가
산생님 + 이 = 산생님이
I hope this helps you! Let me know if this makes sense!
~이 is used here as an "object" marker. because 없다 is considered an adjective, it cannot act on an object. you cannot have a word with the usual object particle ~을/를 attached to it if the predicating word in a sentence is an adjective. to deal with it, ~이/가 is then attached to the object instead of ~을/를. it also has this role with the adjective 있다.