With a battlemap any overlap between creature and area of effect is sufficient (but ask your DM)
Dale's answer covers the case for if you are not using a battlemap.
The general rules for Cover in the PHB p. 196 state:
A target with half cover has a +2 bonus to AC and Dexterity saving throws. (...) A target with three-quarters cover has a +5 bonus to AC and Dexterity saving throws.
Many area-of-effect damaging spells such as Lightning Bolt require Dexterity saving throws. You use the rules for cover to determine what bonus applies to that save. In any case where it is not full cover, the creature will make a save, which means it is affected by the spell.
Now, how many squares of a multi-square creature need to be affected, for the creature to be affected?
If you are using a battlemap, the DMG on page 251 gives a chart for the area taken up by creatures of various sizes (large 2x2 squares, huge 3x3, gargantuan 4x4) and defines Areas of Effect for a spell on the map:
Choose an intersection of squares or hexes as the point of origin of an area of effect, then follow its rules as normal. If an area of effect is circular and covers at least half a square, it affects that square.
The page provides rules on how to determine cover on the map for such an area of effect:
To determine whether a target has cover against an (...) effect on a grid, choose a corner of (...) the point of origin of an area of effect. (Details about affected squares based on lines blocked by cover follow)
If not all squares can be included due to cover, you will need to save as approriate for that cover. Even if you are behind an arrow slit that would only expose the single square directly behind it: 3/4 cover, save at +5. And since you only must make a save if the spell affects you:
If there is any overlap of the spell's area of effect with the creature's space, it will be affected by the spell.
It is not necessary for the entire creature to be in the spell's area of effect to be affected by the spell, or the rules for cover would make no sense. As soon as you had any amount of cover you would be effectively immune to the spell, and have no need to make a save at all.
Now, this is only stated for spells that require a Dexterity saving throw, but it would seem logical that this then also applies to other area of effect spells.
For what it's worth, our DM has not been playing it like that. They determine the overlap, and count a creature in if at least half its squares are covered in the area of effect. I guess they like their monsters, and that is also a reasonable way to do it.
So, because the rules for this are not very explict in the DMG, best ask your DM how they handle it.