Miss Lenhart is a stick figure character in xkcd. She is the go-to character when Randall needs a teacher. She has white hair of shoulder length and is a named version of Blondie, like Rob is a named version of Cueball. She may or may not represent the same character from comic to comic.
Miss Lenhart has only been named twice where she actually appears. The first time she is both drawn and mentioned by name is in 499: Scantron, and the only other time (so far by comic 1731) is in 1050: Forgot Algebra. But her name was used before for a not-shown teacher in 135: Substitute, which is why it makes sense to call the math teacher in 263: Certainty Miss Lenhart. That would thus make it the first time she appeared as a character in a comic.
Her family name is again the only thing used in 416: Zealous Autoconfig, although there it does not directly say that she is a teacher. While school is mentioned, it is for her children. Thus, the name is first connected directly to the blonde teacher in her fifth "appearance" after she was also drawn in 442: xkcd Loves the Discovery Channel.
Later, her name is used again without her being present, except on the phone in 704: Principle of Explosion. Here, she is Mrs. Lenhart. It is possible that this character is the mother of Miss Lenhart. Or, because she here obviously has a son, she may have been married after she was originally named Miss. This is the second time she has been mentioned to be a mother. Both Blondie and one of the other named Blondie-like characters Mrs. Roberts are shown to be mothers. In 2808: Daytime Firefly, the off-screen character of "Ms. Lenhart" is mentioned in the title text (in an imagined conversation with a male teacher) who could be this main character, if not just one or other of her relatives.
Her name is mentioned in total six times. So, the other comics with Miss Lenhart refer to a teacher with her appearance, just like Megan only has been named a few times but is still used to describe the general dark-haired woman. However, Miss Lenhart must have long blonde hair, so a teacher with her hair in a ponytail, like in 982: Set Theory, is not Miss Lenhart but Ponytail, even though the teaching method reminds of the one in 1724: Proofs with Miss Lenhart.
There are several cases where Miss Lenhart is described as a math teacher. Her name is used in this context in her first comic 135: Substitute, and she is both named and drawn in 1050: Forgot Algebra as a math teacher. She is also teaching mathematics in 263: Certainty, 622: Haiku Proof, 1724: Proofs, and 2605: Taylor Series.
Her career appears to closely follow the trajectory of a public-school Math teacher at either the middle or high school level as teachers become subject specific at that point. Teacher's lounges and substitutes are also features of the North American secondary school system. In 1519: Venus and 803: Airfoil she is seen teaching two non-math science related classes, which is something else that happens in American schools due to a general shortage of qualified STEM teachers.
In 1519: Venus, it is confirmed that Miss Lenhart is one month away from retirement (which is shown to result in taking her teaching duties less seriously. Being forced to teach outside her subject matter expertise (Earth/Environmental Science instead of Math) may have factored into her decision, but regardless, public sector teachers in the United States generally still earn pensions and are able to retire earlier than other workers.
After 1519: Venus, we see Miss Lenhart transition to college level material such as 2028: Complex Numbers, 2545: Bayes' Theorem, 2560: Confounding Variables and 2283: Exa-Exabyte. If she did in fact retire early from public secondary school education, it would be possible for her to supplement her pension as an adjunct professor teaching college level science and math courses at a community or state institution of higher education.
In some early comics, such as 435: Purity and 599: Apocalypse, a mathematician looking like Blondie is could possibly be a representation of Miss Lenhart. But so far, they have not been included, as Miss Lenhart as Blondie is not clearly depicted as a teacher (or with name) in these comics.