First you need to safely get a general feel of how much damage you can deal and take against your opponent. Start with a lot of sustain so you can make some mistakes figuring this out. Just go in, deal damage, and run away and see what happens.
Next use this information as best you can. If they are real squishy do what you can to bait out their escapes (looking at you Gnar), and turn around immediately. When they come back flash on them and deal your damage. If they can actually fight with you (Vayne, Quinn, and the like) don't trade, just grab as much farm as you safely can and let the lane push toward you. Just keep an eye on where your jungler is so you can go in, and keep the area near your turret warded to protect from enemy jungler tower dives.
The last thing to do is to adjust your idea of victory. Unless you're a very snowball heavy melee and you get assistance, or unless you heavily outskill your opponent you're not going to get a lot of kills. Your goal should be to not fall behind. If you're not that far behind you'll be able to put out enough pressure mid game to be useful. It's a delayed snowball basically. If you think the enemy team will put a ranged person against you try not to pick a melee champion who falls off late game.
Just for clarity I'm a top lane main, and my advice here is mostly about top. If you're looking for help mid you'll likely either be a melee with ranged abilities or you're trying something I can't really help you with without knowing the specific matchup.