If you are beginning to lose lane, then play passive as hell. You can tell if you are losing when:

1. You lose trades(they do more damage to you when you poke each other)
2. Their jungler is camping you
3. You keep dying

How to play passive:

1. Sit at turret and wait until farm reaches the turret and try to get as much farm as you can(learning to farm under turret will probably make you a million times better at laning)
2. Ask Jungler for help, or ward your rivers if you're worried the enemy jungler will surprise attack you or dive idk
3. Don't take free harrass. Even if they do attack you, attack back a little so you're not the only one getting damaged(unless they can kill you)
4. Freeze lane just before turret range(pretty hard, but if you can learn how to do this then you can farm at ease)

Freezing lane is simple: don't do any extra damage. While the answer is simple, the process is not. Look at all the minions, even yours. See which ones are being attacked by your minions and plan out your csing beforehand. As this goes on, it becomes more and more easier to do it absentmindedly. When the minion get in range of dying, you last hit the creep. Keep in mind that any extra damage you are doing is pushing the lane, so attacking a single creep more than once will stop the freeze more quickly. You can also time your auto attack to reach the creep right as your creeps send their finishing strike so that the damage is balanced out. Of course, that takes more practice and precision.