Escape text for safe insertion into HTML or decode &-entities back to characters. A searchable reference of named entities is right below.
At minimum < > & and quotes inside attributes — otherwise the browser treats them as markup.
Both mean an apostrophe; the numeric form works everywhere, while ' is safe in HTML5 but not in older HTML.
Escaping output is one of the core defenses, but context matters (attributes, URLs, JS) — each needs the right escaping.