While you are behind something, this is known as being in cover. You gain benefits against attacks and saving throws, depending on how well covered you are relative to what is targeting you.
You are in partial cover whenever you are behind something substantial that covers less than half of you.
While you are behind partial cover, you gain a +1 to your AC and a +1 to your Dexterity Saving throws.
You are in half cover whenever you are behind something substantial that covers around half of you.
While you are behind half cover, you gain a +2 to your AC and a +2 to your Dexterity Saving throws.
You are in majority cover whenever you are behind something substantial that covers most of you.
While you are behind half cover, you gain a +4 to your AC and a +4 to your Dexterity Saving throws.
You are in full cover whenever you are fully behind something substantial that covers you in your entirety.
While you are behind full cover, you cannot be targeted by attacks, and you gain a +5 to your Dexterity Saving throws.
In most cases, you cannot be seen while in Full Cover.