(See also Combat System & Actions for rules on Grappling and attacking Unseen or with Surprise)
DIM LIGHT = "Lightly Obscured"
examples: boundary between light (e.g. torch) and darkness, twilight, shadowy areas, bright moonlight.
In a Lightly Obscured area you have DISADVANTAGE on sight-based Perception checks.
Normal vision with DIM LIGHT illumination counts as Lightly Obscured (see Illumination Range Table below).
All vision is impaired as Lightly Obscured in areas such as patchy fog or moderate foliage (unless exception noted).
When you have Perception disadvantage, your passive perception has a -5 penalty.
DARK = "Heavily Obscured"
examples: shadow, night time, underground, Darkness spell/magic.
If you are within or targeting anything within a Heavily Obscured area you are considered Blinded.
You effectively have condition Blinded if you are:
a) under the effects of physical blindness (eyes covered, eye wounds, etc.),
b) under the effects of magical blindness (Color Spray, Blindness, etc.),
c) trying to attack something invisible or that has successfully hidden from you, or
d) trying to see/attack something within an area
DARK to you (due to illumination or range), or (equivalently)
heavily obscured (Fog Cloud spell, heavy rain/snow/fog/smoke/dust, dense foliage, insect swarm).
If you have condition “Blinded”:
you auto-fail ability sight (Perception) checks,
you cannot use skills or magic that requires sight (e.g., "a target you can see"),
your attacks are at DISADVANTAGE, and
non-blinded foes have ADVANTAGE on attacks to hit you.
Several creatures and races in D&D have "Darkvision" - but it is important to understand that Darkvision simply changes normally "DARK" areas to be considered "DIM " (and normally "DIM " areas considered "bright") within the listed range (usually 60 feet). Darkvision does not provide any benefit vs. Darkness created by a spell or magical effect (which is considered "Magical Darkness"). See also Sly Flourish: "Darkvision isn't as good as you think".
Devil's Sight (many Fiends have this, also a Warlock Invocation) allows seeing even in Magical Darkness.
Tremorsense allows you to accurately track locations (no attack disadvantage in range) from footfalls (no help vs. flying).
Blindsense allows you to accurately track locations (no attack disadvantage in range) with sound or other senses.