Just for the sake of completeness, I will state the complete list of equivalences:
Proposition. Let $X$ be a space and $A\subset X$ be a subspace. The following are equivalent:
(1) There is $U\subset X$ open such that $A\subset U$ and $A$ is closed in $U$.
(1') $A$ is the image of the composition of a closed immersion followed by an open immersion.
(2) There is $F\subset X$ closed such that $A\subset F$ and $A$ is open in $F$.
(2') $A$ is the image of the composition of an open immersion followed by a closed immersion.
(3) $A=U\cap F$, for some $U\subset X$ open and $F\subset X$ closed subsets.
(4) For all $x\in A$ there is an open neighborhood $U\subset X$ of $x$ such that $A\cap U$ is closed in $U$.
(5) For all $x\in A$ there is a neighborhood $U\subset X$ of $x$ such that $A\cap U$ is closed in $U$.
(6) $A$ is open in $\overline{A}$.
(7) There is $U\subset X$ open such that $A\subset U$, $A$ is closed in $U$, and $U\cup \overline{A}=X$.
If any of these equivalent conditions happens, we say that $A$ is locally closed in $X$.
Moreover, if $A$ is locally closed in $X$ and $U\subset X$ is an in (7), then $U=(X\setminus\overline{A})\cup A$ and $U$ is the maximum in open subsets $V$ of $X$ that contain $A$ and such that $A$ is closed in $V$.
The proof of the equivalences (1)$\Leftrightarrow$(1'), (2)$\Leftrightarrow$(2'), and (1)$\Leftrightarrow$(2)$\Leftrightarrow$(3) is immediate. The rest of the equivalences that do not involve (7) were already proven by Jérémy Blanc on his answer.
(6)$\Rightarrow$(7). Since $\overline{A}\setminus A$ is closed in $X$, the set $U=X\setminus(\overline{A}\setminus A)=(X\setminus\overline{A})\cup A$ is open in $X$. It is clear that $\overline{A}\cup U=X$. The closure of $A$ in $U$ equals $\overline{A}\cap U=A$.
(7)$\Rightarrow$(6). We have $X\setminus\overline{A}=U\setminus\overline{A}=U\setminus A$, where the last equality follows since $\overline{A}\cap U=A$, for $A$ is closed in $U$. Hence $U=(X\setminus\overline{A})\cup A=X\setminus(\overline{A}\setminus A)$ is open, so $\overline{A}\setminus A$ is closed. Thus, $A$ is open in $\overline{A}$.
Finally, to see the maximality of $U=(X\setminus\overline{A})\cup A$, let $V$ be an open subset of $X$ containing $A$ and such that $A$ is closed in $V$. Let $x\in V$. If $x\in A$, then $x\in U$. If $x\notin A$, then $x\in V\setminus A=V\setminus\overline{A}\subset X\setminus\overline{A}\subset U$ (the first equality follows from the fact that $A$ is closed in $V$). Hence $V\subset U$.