I often see pros say things like "I'm playing against X here so I'm going to be aggressive" or "I'm playing Y so I just need to sit back/hold my ground/be under tower and farm". How do I know what strategy to take before I get to lane? Specifically, I am talking about bot lane, but I assume this applies similarly to any lane.
You dont, until you've played the game enough that you do. This kind of forknowledge comes from experience and know-how of the games mechanics, the Champion's abilities (both enemy and friendly) and the skill level of the player, among other factors.
One example can include a bot lane matchup where you have a soraka support and they have a zyra support. Your lane has sustain, and theirs does not, so you may be able to successfully bully them out of lane and force them to recall since you can heal from soraka and they cannot. However there are too may different possible scenarios to realistically answer this question beyond what I've written IMO.
Assuming equal skill on both sides, it mostly comes down to matchup.
Some factors (but not all) that affect matchup:
- Early/mid game strength.
- Late game scaling.
- Lane type, e.g., burst, sustain, poke. (As a general rule, burst > sustain > poke > burst)
As you play more, you should learn more about each champion's strengths and weaknesses, and how they fare in certain matchups. Some are not immediately obvious, and come with experience.
However, sitting back and "hugging" the tower is mostly unadvisable, and should only be done in extremely unfavourable matchups. "Passive" playing does not imply that you should avoid all opportunities to harass, it just means that you should not be making aggressive trades. The worst mistake tends to be when players take free harass, in other words, they take damage from the enemy without damaging the enemy in return. Even so, sometimes it's not possible to counter-harass, if they outrange you.
It's difficult to explain in a succinct answer, as answering this question relies on the knowledge of lane mechanics.
Remember to only harass when they're trying to cs.