Is $(0,1]$ a closed or open set?
Neither. It doesn't contain a neighbourhood of $1$, so it isn't open; nor is its complement, $(-\infty,\,0]\cup (1,\,\infty)$, which doesn't contain a neighbourhood of $0$.
It's important that you specify where you are considering the subset $A$.
If $A \subset X$ with $ X = \mathbb{R}$, J.G. is absolutely right in the usual topology of $\mathbb{R}$.
If $A \subset X$ with $ X = [0,1]$, $A^c = \{0\} $, which is closed in the usual topology, then $A = (0,1]$ is open.
In other words, it's important to specify in what topologic space $X$ you are considering $A$ as a subset. There are some stranger metrics which may define some different open sets where things can be different.