Continuous function
The intuitive idea behind continuity is that a function is continuous if small changes in the input produce small changes in the output. If small changes to the input produce an abrupt change in the output, the function is said to be discontinuous.
First consider the case of a function f that maps a real-valued variable x to a real-valued variable y. A function y = f(x) is continuous at x=x0 if the following holds: For any positive number epsilon, there exists some positive number delta such that for all x where x0-delta<x<x0+delta, the value of f(x) will satisfy f(x0)-epsilon<f(x)<f(x0)+epsilon. More intuitively, we can say that if we want to get all the f(x) values to stay in some teeny neighborhood around f(x0), we simply need to choose a small enough neighborhood for the x values around x0, and we can do that no matter how teeny the f(x) neighborhood is.
An example of a discontinuous function is f(x)=1 if x>0, f(x)=0 if x<=0. There is no delta-neighborhood around x=0 that will force all the f(x) values to be within epsilon of f(0), for any epsilon < 1. Intuitively we can think of a discontinuity as a sudden jump in function values.
To generalize, consider a function f that maps x to y, where x is a member of a metric space X and y is a member of a metric space Y. Then f is continuous at x=x0 if for any positive real number epsilon, there exists a positive real number delta such that all x in X satisfying dx(x,x0) < delta will also satisfy dy(y,y0) < epsilon, where dx and dy are metric functions for X and Y respectively.
More generally still, we can define continuity for functions between topological spaces. Suppose f is a function from a topological space X into a topological space Y. Then f is said to be continuous at a point x in X if for every neighbourhood V of f(x) there is a neighbourhood U of x such that f(U) is a subset of V. If f is continuous at every point of X, then it is simply said to be continuous. It turns out that a function is continuous if and only if the pre-image of every open set is open, and so this is often used as the definition of continuity.