The words "got wondered" don't make sense here. Depending on what you want to say, you could change these to "Maria became curious/started to panic/ laughed/ started to wonder after a teacher told her about it."
"a teacher" here refers that it wasn't any specific teacher (some general teacher, one of many). And that it wasn't really important that it was this(!) teacher.
Hope it helps!