Depends on your champ
If you are playing Nasus then you might want to not fight at all. But if you are Quinn, you usually want to go in on the melee champ when your e is up or the opportunity presents itself.
Try and find that sweet spot for you in trading. The best times are when the enemy used a vital ability for trades (such as darius missing e in a Quinn matchup) or when your jungler is about to gank. Most players will get distracted and not look at the Minimap when in a trade, you can take advantage of this by engaging on the enemy laner just before your jungler would enter their vision/nearby warded area.
For farming, MAKE SURE YOUR GET CANNON MINIONS. But of course make sure that you can get the cannon minion without dying. If you are low and the enemy is standing near (in this example you are a melee and the enemy is ranged/has CC) don’t go for the cannon if you don’t have any ranged abilities ready, you will easily get killed and that can snowball the lane for the enemy.
Now with the overextending part: make sure you have wards set up in the river bush and the Tri bush near the red side top lane tower. If you are on the “red side” of the map, place a control ward in that Tri brush and a regular ward in the brush right on the edge of the river. If you are blue side, or any side in general, only place a control ward in the river brush if you are pushing and is putting pressure in the lane. If you aren’t pushing/putting pressure on the lane then the enemy can walk down and clear the control ward, which would be a waste of gold.
When you are overextended pay a lot of attention to your map and to the behavior of your laner. If he is getting more aggressive and you have no wards up, it is safe to assume that the jungler is near and you should back up.
If the jungler is missing and you are overextended, always assume he is in the top lane jungle and play cautiously until you see him again. If he shows in the bottom portion of the map you can play more aggressive if you want. Also pay attention to the location of the enemy mid laner and say a friendly (key word is friendly) reminder to your midlaner to always ping MIA if their laner isn’t visible. Of course you should always do the same for your MIA pings too.