Continuity of piece-wise defined function $f(x) = x^2$ if $x\leq 1$, 
$f(x) = 1$ if $x>1$.
To show that the above function is continuous at $x=1$, I have tried the following method,
$\epsilon$-$\delta$ definition to show continuity.
What other methods can be used for this example, or in general cases, or in the case of functions mapping from $\mathbb{R}^2$ to $\mathbb{R}^2$.
Example of complex function(analogous to $\mathbb{R}^2 \to \mathbb{R}^2$),
$f(z) = \frac{z^3-2}{z^2+z+1}$ if $|z|\neq 1$
$f(z) = \frac{-1+i\sqrt 3}{2}$ if $|z| = 1$
 A: See in this example if $$\lim_{x \to 1^-}f(x)=\lim_{x \to 1^+}f(x)=f(1)$$
You can use it also in general cases of piecewise functions to check continuity at  an arbitrary point $x_0$ in the domain of the function.
In general see if  
$\lim_{x \to x_0}f(x)=f(x_0)$ holds
A function $f(\bar{x})=(f_1(\bar{x})...f_n(\bar{x}))$ from $\mathbb{R}^n$ to $\mathbb{R}^n$ is continuous iff each of its component functions $f_i$ is continuous.
So you have to check the continuity of each component function.
Also a general and handy method is to check the continuity of the function using the sequential characterization of continuity in $\mathbb{R}^n,\forall n \geq 1$(and in metric spaces in general).
See this.
You can use this method also to prove the discontinuity of a function at a given point.
Let me show an example.
Take $f(x)=\begin{cases}\
            \sin{\frac{1}{x}} ,& x \neq 0\\
             0 & x=0\\
           \end{cases}$
Take the sequence $x_n=\frac{1}{2n \pi+\frac{\pi}{2}} \to 0$.
But $f(x_n)=1 \to 1  \neq 0=f(0)$.
So according to the theorem of sequential continuity,the function is not continuous at zero.
