Cover

A creature can take Cover by moving behind a solid physical barrier such as a tree, boulder, or wall, that shields their body from attacks. There are different degrees of cover, depending on the object protecting the target:

Partial Cover is granted when a target is partially protected, such as behind a tree or column, behind an ally or at the edge of a wall. Attacks made against a target with partial cover have Disadvantage on the attack roll.
Superior Cover occurs when a target is almost fully protected, such as ducking behind a low wall, in a trench or through arrow slits. Attacks against a target with superior cover have two Disadvantages.
Total Cover is granted when a target is behind a wall or other barrier that completely blocks Line of Effect. An attack on a creature with Total Cover automatically misses and hits the barrier instead. Even if an attack breaches the barrier and reaches the target beyond, the barrier still provides Superior Cover to the target for the attack. (Subsequent attacks against the target may have reduced, or no Cover depending on how much the barrier was damaged)

Cover only applies to attacks that require Line of Effect.

Regardless of the level of Cover, you may not make Opportunity actions against a creature that has Cover from you.