The notion of limit is, most generally, a topological notion. It is defined in terms of the topology of the space in question. This of course begs the question: what is a topology? Formally, a topology, $\tau$, for a set $X$ is a collection of subsets of that set, defined to be open, which satisfies the following properties:
1: The empty set $\{\}$ and the entire set, $X$ are elements of the topology, $\tau$.
2: Given any collection of sets in the topology, $U_i\in\tau$ for $i\in I$ ($I$ is an index set), the union of those sets, $\bigcup_{i\in I} U_i$ is also in the topology, $\bigcup_{i\in I} U_i\in\tau$.
3: Given any finite collection of sets in the topology, $U_i\in\tau$ for $i\in I$, the intersection of those sets, $\bigcap_{i\in I} U_i$ is also in the topology, $\bigcap_{i\in I} U_i\in\tau$.
The point of the above abstract definition is that the resulting structure gives a notion of nearness, via the open sets defined by the given topology, that is less rigid than distance (to fully appreciate what is meant by that, you would need to study topology a fair bit).
With topologies defined, one can then define the notion of a limit of a function rigorously:
A limit of a function, $f$ between topological spaces, $(X,\tau)$ and $(Y,\sigma)$, as $x\rightarrow x_0$ is a point $y_0\in Y$ such that:
Given any open set $V\in\sigma$ containing $y_0$, there exists an open set in $U$ containing $x_0$ such that the image under $f$, of $U-\{ x_0\}$ ($U$ with the point $x_0$ removed from it), $f(U-\{ x_0\})$ is contained in $V$, $f(U-\{ x_0\})\subseteq V$.
Two things to note: First of all, existence of such a point $y_0$ is not guaranteed, and indeed there are many examples of limits that do not exist. Second, there is no immediate guarantee that the $y_0$ is unique, there may be many such points, hence in general one can only speak of a limit rather than the limit. However, most topologies of interest outside of the study of topology itself satisfy a property called the Hausdorff property, which guarantees that when a limit exists, it is unique, hence in Hausdorff topological spaces we can speak of the limit.
The point of the definition of limit above, is that the function, $f$ can be said to eventually be within every neighborhood of the limit point (the term neighborhood is a synonym for open set here).
Bringing the above abstraction back down to the case of interest:
The real numbers has a natural choice of topology, which is defined via a basis:
A basis for a topology is a subset of that topology, from which one can reconstruct the rest of the topology via unions. For the real numbers, this basis is the open intervals: $(a,b)$ (with $a<b$). Hence an arbitrary element of the standard topology for the reals looks like a union of open intervals:
$\bigcup_{i\in I}(a_i,b_i)$, where $i\in I$
If consider a limit point $y_0$, provided that it exists, we speak of the open neighborhoods around that point, those being any open interval $(a,b)$ such that $y_0\in (a,b)$ (more generally given an element of the standard topology of the reals, $y_0$ will lie in at least one of the open intervals in the union, hence we can concentrate on just basis elements). The definition of limit in this context becomes: given any open interval $(a,b)$ containing $y_0$, there exists an open interval $(c,d)$ containing $x_0$ such that the image of $(c,d)-\{ x_0\} =(c,x_0)\cup (x_0,d)$, $f((c,x_0)\cup (x_0,d))$ is contained in the other open interval $f((c,x_0)\cup (x_0,d))\subseteq (a,b)$. The formal $\epsilon$-$\delta$ definition of a limit that you will encounter in most formal introductions to limits (e.g. in most rigorous calculus texts) is nothing more than a restatement of the above without specific reference to the topology involved (since much of the motivation for developing topology came from attempts to extend the tools and techniques of calculus to more general mathematical contexts, and, historically, calculus pre-dates topology by roughly 3 centuries, and even limits pre-date topology by at least 50 years, this is pedagogically justified).
The intuitive way to think about limits in the context at hand is to ask: What is the function doing around the $x=x_0$. Is it always staying around some particular value, $y_0$? If yes, then, intuitively, it has a limit at $x=x_0$ of $y_0$. The above makes that intuition precise in a mathematically rigorous way.