At least in my state, you can't drop out until 16 (with parental consent) or 18 on your own accord. Nevertheless, it's genuinely disgusting for teachers or counselors at high schools to say these things to a child. Kids internalize labels, and it's simply lazy teaching stemming from an unwillingness to foster growth.
You still have a TON of time to lock in and get good study methods, or find what works best for you. Also, high school grades won't make or break your life (but you should still strive for good ones, since it can make things easier immediately out of high school if you plan to attend college). I did NOT do well in high school whatsoever, but I've got an A GPA in college and just got hired at one of the top research institutions in the world.
Grades don't define you, and they certainly aren't a genuine indicator of your intelligence. People are intelligent in different things--some things click and others don't; everyone is like that. It's easy to be discouraged, especially when a teacher treats you poorly. You can 100% prove them wrong. I had a ton of difficulty getting work done in high school, but my advice to you is to just seek out help if you're struggling and don't hesitate to ask questions. If not from an unsupportive teacher, then from someone else you trust at your school. You've got this.