Intuitive explanation of ball-based definition for continuity of functions in metric spaces First of all, hat tip to @Fayz for providing this definition.
Backstory: I broke my glasses several days ago and, in the meantime, this important definition was written on a board I could not see.  The lecturer not being, well, good... I didn't catch even the gist of this definition and now have exercises that use it extensively.

Let $(X, d)$ and $(Y, e)$ be metric spaces, and let $x \in X$.
  A function $f : X \to Y $is continuous at $x$ if $\forall\ B \in \mathcal{B}(f(x)),\ \exists A \in \mathcal{B}(x) : f(A) \subseteq B$.

The only thing I know about this definition is the fact that it uses the concept of balls in a metric space, an idea with which I'm quite familiar from previous courses:
$$ B(x,\ r) = \{ p \in X : d(x,\ p) < r \} $$
where $B(x,r)$ is an open ball about $x$ of radius $r$, and $d$ is a metric on a set $X$.
I don't know what $\mathcal{B}$ is supposed to be.
Can anyone provide an actual explanation of this definition?
 A: It means that you can go shrinking a ball in the space of arrival, and you will always find a ball in the space of departure that will fit there.
So basically is the same idea with have with the limit deffinition, but now can be apply to spaces that don't involve real numbers in any manner. This is a more general definition 'topological definition'. Than can be used in a structure with less assumed properties (i.e a topological space).
A topological space assumes very little properties.
We say that $X$ with a colection of subsets of $X$, $T$ that satisfies the conditions:
1) The empty set is in $T$
2) $X$ is in $T$
3) Any intersection of a finite number of elements of $T$ is in $T$
4) The union of an arbitrary number of elements in $T$ is in $T$
is a topological space. And we call the elements of  $\text{ } T$ open sets.
Not that in a topological space you can define a ball without having a distance defined. Whereas in the standard definition of continuity we need a way to measure the distance.
So therefore in you add a norm to the topological space, both definitions are equivalent. And indeed you can deduce the same properties. As for example the very nice property ($f$ is continuous if and only if the anti-image of an open ser is an open set).
In both definitions the idea is the same, when you 'approach' a place of space as much as you want, the images of your function aproach to the image of that place. Now the place need not be a point, as there are no points in a topological space. And you may not be able to measure the rate of your approaching, as there is no distancy in general. 
A: One definition for continuous functions between metric spaces is as follows:
Let $(X,d)$ and $(Y,e)$ be metric spaces, and $x\in X$.
A function $f:X\to Y$ is continuous at $x$ if $\forall \epsilon>0$, $\exists \delta>0$ such that $f(B_d(x,\delta))\subset B_e(f(x),\epsilon)$.
Here $B_d(x,\delta)=\{p\in X:d(x,p)<\delta\}$, a ball of radius $\delta$ about $x\in X$,
and $B_e(f(x),\epsilon)=\{q\in Y:e(f(x),q) <\epsilon\}$, a ball of radius $\epsilon$ about $f(x)\in Y$.
(Note: you may be more familiar with this equivalent version: $f:X\to Y$ is continuous at $x$ if $\forall \epsilon>0$, $\exists \delta>0$ such that whenever for $z\in X$ and  $d(x,z)<\delta$, we have $e(f(x),f(z)) < \epsilon$.)
So to interpret your given statement, the first $\cal B(f(x))$ represents the collection of all possible open balls about the point $f(x)\in Y$, that is $\cal B(f(x))=\{B_e(f(x)):\forall\epsilon>0\}$, and $\cal B(x)$ represents the collection of all possible open balls about $x\in X$, that is $\cal B(x)=\{B_d(x,\delta):\forall \delta>0\}$.
Hence the statement "$\forall B\in{\cal B(f(x))}, \exists A\in {\cal B(x)}:f(A)\subset B$" is read as: for any open ball $B$ about the point $f(x)$ (of any radius, say $\epsilon$), we can find some open ball $A$ about $x\in X$ (of radius say $\delta$) such that the image $f(A)$ fits in $B$.
