Lets say that you're a melee champion against a ranged a champion top and they are harassing you every time you get near your creeps and you can't farm. How do you counter this other than having your jungler come and help?
Normally at the point you are zoned out it is too late to do much besides last hit under your tower. Because they are ranged, they can continue to harass even as you pick up those last-hits.
At that point my preferred method (without jungler help) is to back away (recall) if they are zoning me away from me turret. Buy some items and if you are not too far behind you can take the advantage. In particular and if things are very dire, buy a fortitude elixir!
I think a key point here is that against ranged champions, melee have an advantage once they get within melee range. So you really just have to pick and choose your battles and ensure you win the early exchanges as taking too much harass will just snowball the lane against you.
Remember good match ups are key so always consider that in champion select if you are running draft mode!
If you are getting zoned and cannot receive help from your team (in the form of a gank or a lane swap), you have a few options:
If your melee champion has a slow or gap closer (or you took a summoner spell that helps you close gaps), make the ranged opponent pay for their pokes.
The key things to keep in mind if you are going to be aggressive:
Because of game balance, your melee champ will usually hit a bit harder than the ranged champ early game. If you make them pay for their pokes, you'll make them think twice about moving in to hit or zone you.
This will take some getting used to, of course. The natural inclination is to be cautious so you don't give up a kill. Once you practice the counter-poke with your melee champion of choice, however, it's very effective.
If you have no easy way to trade the poke, you'll need to let the lane push to your tower to increase the size of your effective zone. Once you do that, you'll be safe. Then, you have to learn how to work with your tower such that you get all the last hits on minions.
This will vary by champion and throughout the game, but the general rules are:
So, you'll want to wait for the tower to hit a melee minion it is targeting twice (assuming it was at full health), then get the last hit. For spellcaster minions, hit it once yourself, let the tower hit it once, then hit it again for the kill.
It can take some getting used to at first, but one you master last-hitting under a tower, you'll find that you do not fall behind on farm. In addition, you're safe from ganks and you're putting the opponent in a position that makes them much more easy to gank when your team can provide assistance.
This is a rough situation, because the clearest and BEST solution is to have your jungler come gank. Ganks in this position are easy because the enemy has to put themselves in or past the creep wave in order to zone you and are thus very vulnerable.
Without a gank, the best you can do is to farm at turret until you are in a position where you can close the distance to the enemy laner and kill them or force them to recall. If you engage a fight and get low but don't kill or force them back, you will just be zoned again.
There are a few match ups which can out-sustain harass like old-school Tryndamere, Warwick, or Udyr, but this requires constant auto-attacking and risks pushing the lane and exposing yourself to ganks from the enemy jungler.