There are a plethora of ways to beat counterspell decks. Here are some of the most generic (and most important):
- Play at instant speed. This is easily the most effective way. For example at the end of your opponent's end step you play Nightpack Ambusher. If they don't counter, you have a powerful threat in play that you can use to force them to tap their mana to answer. If they counter, then they are tapped low, and you can resolve another threat on your turn. You can also do this when they try to do something on your end step.
- Play counter-counters. Core Set 2020 introduced two of the most powerful spells in the game for this purpose, seeing play all the way to Vintage & Legacy: Veil of Summer and Mystical Dispute. Basically you play your threat, they counter, you respond with Veil/Dispute and they need to both have a second counter and the mana to cast it - something that is not trivial and potentially impossible early in the game. If these spells aren't legal in the format you're playing, there is still Negate and Spell Pierce.
- Play discard. This is very similar to the counter-counter plan, except it's proactive. So you play a card like Thoughtseize or Duress. If they don't counter, you can take the counterspell and play something else. If they counter, you've gained a mana advantage (these discard spells are 1-mana, counters almost always cost more), they will be tapped low, and you can cast another spell. Play note: you might not want to play the discard spell the turn you draw it, instead saving it for a turn when you can force a threat through.
- Play cheap spells. For example, at four mana, you can play two 2-mana spells on the same turn, and they will almost surely only be able to counter one.
- Play uncounterable threats. Not always possible, but Cavern of Souls and Aether Vial go a long way.
- Be threat-dense. The more must-counter spells you have, the better for you, and the more likely they are to run out of counterspells. "Must-counter" means a threat so strong that if opponent does not counter, they probably don't have a counterspell. An example is Stoneforge Mystic, because if she's not countered you 1) gain card advantage and 2) can cast the equipment uncounterable next turn.
A corollary of all this is that if your deck is all expensive sorcery-speed threats, counterspells will be very effective against you, so you will need a good sideboard plan.
Aside from these generic plans, some of the most effective counterspell hosers are Teferi, Time Raveler and Defense Grid.
See also How to build a multi-colour aggro deck to be more effective against control which deals with the broader question of how to beat control decks (which often but are not always counterspell heavy).