If you're able to spot the enemy while hidden under cover, it can be extremely effective to lean out of cover to shoot.
You can vary the distance you lean out depending on how close the enemy is in order to mitigate the risk of getting shot. The downside is it limits your field of vision, and you can't move when leaning out so it can make you an easy target to sneak up on. Another tactic is to have your squad mates distract the enemy by firing under cover, and allowing you to creep up from behind and take them out.
Use cover effectively to scout ahead, but remember not to stop in one place for too long.
Opponents who stick to cover like glue can be coaxed out with a well-placed grenade, but the act of lobbing a grenade can itself open you up to attacks in turn.
Cover can be exited by meleeing, sprinting, or holding down.