How Do Students Interact with an LLM-powered Virtual Teaching Assistant in Different Educational Settings?