Ask a lot of questions. Without shame, without regard for looking like a fool for asking the easy questions. This is the single-most important thing to learn as a student and the purpose of your time in high school is to learn how to be a good student for the rest of your life.
Stage 1: Get Comfortable
Start with the easy questions "Can I go to the bathroom", "What day is the quiz", etc. These will help you become comfortable with raising your hand and speaking while the whole room is listening. It doesn't matter that you already know the answer. Try not to be obnoxious and ask the same questions over and over again or questions that were asked in the last 15 minutes. But for the latter, you can always start with an apology.
Stage 2: Play Jeopardy
Then move to questions that show that you are listening. These aren't so much questions as they are restating what you just heard in the form of a question. You can start with, "Just to make sure I understand correctly...". Like in Rubber duck debugging, the point of these questions is to help you rephrase material, play with it in your head, and make sense of it from multiple angles. It seems unnecessary most of the time, but in hindsight, it is extremely useful.
Stage 3: Probe
Now you want to ask questions that augment the material at hand. The easiest of these are hypotheticals. It takes a bit of practice to not sound like an idiot when asking these, but that should not deter you. Say the question under your breath a few times before raising your hand. You can also pretend like you're thinking aloud and then retract the question as soon as you ask it. The point of these questions isn't to get an answer, the point is to ask the question and to explore the possibilities. These will probably get you the most amount of flak from your classmates. The important thing to keep in mind here is to let the teacher decide whether or not there is time to entertain the question.
Stage 4: Challenge Authority
When the teacher says something, ask why. Don't believe something just because the teacher says so. Even if the answer to "why" is common knowledge. Discretion in these is advised, obviously. Sound curious, not impertinent. This is important. More importantly, be curious, not impertinent.
In rare occasions you'll get the opportunity to outright disagree with the teacher. Take it. In most scenarios you'll be surprised because the teacher will actually be right (believe it or not, teachers aren't stupid), and that might deter you in the future if you start believing the teacher is always right. Treat each question independently. Much like the outcome of rolling a die doesn't depend on the last roll, treat each situation in which you might look like an idiot for wrongly disagreeing with a teacher is an independent scenario.
Stage 5: Answer Questions
Hopefully, your behavior will encourage question-asking from your peers. I've found that the more questions I asked, the more it encouraged others, and the more a lecture turned into a class discussion. Don't be afraid to answer someone's question without raising your hand or address someone directly in the classroom. I've found that a lot of teacher's don't mind sacrificing order in the classroom for this type of discussion as long as it doesn't turn violent. It reduces the amount of energy they need to spend in that hour and it usually leads to better class engagement and to the general level of satisfaction after the period is over.
There you have it. The 5 stages. Especially in high school, if you have a choice, err on the side of obnoxious (within reason). In retrospect, I wasn't as vocal in class until senior year of high school. I was more quiet in my freshman year of college, but then gained a lot of confidence (and respect from classmates/professors) in the last 3 years of my college career. One nice thing that came out of being vocal and asking a lot of questions was that I could usually skip homework reading and basically get professors or classmates to summarize entire chapters as answers to questions. This occasionally also ended in disaster and embarrassment when I was called out, but that sting doesn't last as long as you would think.