"Maria is a teacher."
Both is correct. は is a topic marker and が is a subject marker. So, for example, if somebody asks "What does Maria do for a living?" the answer is マリアは先生です, but if the question is "Who is a teacher?", the answer is マリアが先生です (Maria is a teacher), because you're stressing the word before the が, aka the subject. So basically it depends on the conversation and what you're trying to say. You can read more about it here, here and here
The best way to explain it は is what is being talked about が is what is doing the action (both work in this case) を is what the action is being done to
In english, this would be
マライさんは先生です。As for maria, [maria] is a teacher
マライさんが先生です。Maria is a teacher
In the first example, maria is more in the context of the sentence, whereas in the second, you're more putting her forth since she is doing the action of being a teacher, but maria as a subject is still implied in the first since she is still doing the action of being a teacher.
Does that make sense?
It's because when talking about yourself, there is usually only one subject. For example, in the sentence 学生です, there is only one subject, and therefore no need for a は. Sorry if this doesn't make sense, I'm really bad at explaining things.