Learning vs cheating: where the line is
The test: who did the thinking?
Using AI to understand a topic is very different from using it to do the assignment for you. The point of homework is to build skills in your own head; if AI does the thinking, you get the grade but not the skill, and it shows on tests and later in life. Schools have different rules: some allow AI for brainstorming, some for feedback, some not at all. The rules your teacher sets are the rules for that class. When in doubt, ask before you use AI.
Usually OK (if your class allows it): "Explain what a thesis statement is and show me a weak and a strong example about a different topic."
Usually NOT OK: "Write my 500-word essay on Romeo and Juliet."The first builds your skill. The second hands in someone else's thinking as yours.
A quick self-test: "Could I explain and defend every sentence of this to my teacher without the AI?" If not, it isn't really your work.
AI detection tools are not reliable, but that's not the point. Honesty is about what you hand in as yours.