Personally, I prefer the definition of it being a set that contains an open set that contains the element. When people say that a neighbourhood of $a \in X$ is just an open set that contains the element a, it takes off some cases. I'll explain it better:
We say that a is an interior point of $X \subset \mathbb{R}$ when there is a number $\epsilon>0$ such that the open interval $(a-\epsilon,a+\epsilon)$ is a subset of $X$.
The set of the interior points of $X$ is called the interior of the set $X$, represented by $int\space X$.
When $a\in int\space X$, we say that $X$ is a neighbourhood of the point a.
A set $A \subset \mathbb{R}$ is called an open set when $A = int \space A$, that is, when all the points in A are interior to A.
Being so, when a 'neighbourhood of $x$' is defined as being an open set containing $x$, it is not considering the cases in which the set in which $x$ belongs is a closed set.
Let's say that we have $c<x<d$ and $x \in A = [c,d]$. Then the interior of $A$ is the open set $int \space A = (c,d)$. Also, we have that $x \in int \space A$, and so $A$ is a neighbourhood of the point $x$ - it is a set containing an open set that contains the element $x$.
In the spectrum of topological spaces, one talks about open and closed neighbourhoods - in that case, the definition of an 'open neighborhood' can then be stated as an open set containing the element.