An Availability Group replicates a set of databases across several SQL Server replicas -- one Primary (live, taking real traffic) and one or more Secondary (standby copies) -- with SQL Server able to fail over between them at any time, planned or not. A job hardwired to one fixed server breaks the moment that happens: it either fails outright, or worse, runs writes against whatever's now sitting there as a read-only Secondary. AG Settings is what lets a job or step stay correct through a failover without anyone having to notice it happened or go update anything.
Two independent things, both set per job and overridable per step: a skip-gate ("only run if this database is currently Primary/Secondary, otherwise skip/fail/reroute") and target resolution ("don't use a fixed Target Server -- connect to whichever approved server currently holds the role I want"). Nothing about a server's Availability Group membership is typed in or tagged anywhere; naming one database is enough; the group and its current replicas are discovered live off that database every time the gate or resolution runs, so a failover is picked up automatically with nothing to keep in sync.
A step can leave either section at "(inherit from Job)" to use the job's own setting, or override just the one it needs. For a step whose Database-cursor spans several databases, the skip-gate checks every resolved database at once -- if even one doesn't currently match, the whole step is skipped/failed rather than partially running.
See availability-group-target-resolution.md for the full technical story.
Related: Target Servers -- how servers themselves get added and approved. Glossary -- Availability Group, Gate, and every other term used here.