A net is a function from an directed set $(I, \le)$ (say) to a space $X$.
$f: I \to X$ converges to $x$ iff for every open set $O$ that contains $x$ there exists some $i_0 \in I$ (depending on $O$, in general) such that for all $i \in I, i \ge i_0$ we know that $f(i) \in O$.
The point $f(i)$ is often denoted by subscript: $x_i$. This subscript an be any member of the directed set $I$. A sequence is the special case where $I=\mathbb{N}, \le)$ (in its standard order). The definition is non-metric in that we use open sets containing $x$ (not open balls) but for metric spaces it suffices to check this for open balls $B(x,\varepsilon), \varepsilon>0$ as these form a local base at $x$.
I think that $\lim_{x \to a} f(x)$ can be defined by considering all nets $n$ on $X\setminus \{a\}$ that converge to $a$, and if all those nets have the property that $f \circ n$ is a net in $Y$ converging to the same $b \in Y$, then this $b$ is called the limit of $f$ as $x$ tends to $a$.
If $X$ has a topology induced from a metric, e.g. then we can restrict ourselves to sequences instead of general nets in the above characterisation.