Given a "sufficiently nice" function f(x) (details on what "sufficiently nice" means will not be delved into), defined on the entire real line RR, the Fourier transform of f(x), denoted hat{f}(omega), is defined by the formula:
hat{f}(omega)=\int_{-\infty}^{\infty}f(x)e^{i \omega x}\ dx, where i is the imaginary unit (i^{2}=-1).
Note 1: Sometimes people put an extra -2pi in the power of e. Alternatively, sometimes people put an extra 1/sqrt{2pi} in front of the integral.
Note 2: With respect to the given improper integral, the omega is a constant. However, since we can (hopefully) do this for many values of omega, we ultimately think of omega as the variable for the "new function" hat{f}. Typically omega is a real variable, though hat{f}(omega) is a complex number (in general).
Note 3: Technically speaking, then, the Fourier transform is the (more general kind of) function that maps f to hat{f}. Sometimes this is written as mathcal{F}(f)=hat{f} (in other words, mathcal{F} is the symbol for this function that maps f to hat{f}).
As an example, let f(x)=e^{-|x|}. Then, not worrying about convergence issues, and using Euler's formula e^{i theta}=cos(theta)+i sin(theta), we get:
\hat{f}(omega)=\int_{-\infty}^{0}e^{x}e^{i omega x}\ dx+\int_{0}^{\infty}e^{-x}e^{i omega x}\ dx
=\int_{-\infty}^{0}(e^{x}cos(omega x)+ie^{x}sin(omega x))\ dx+\int_{0}^{\infty}(e^{-x}cos(omega x)+ie^{-x}sin(omega x))\ dx.
Now (via Wolfram Alpha or tables of integrals),
\int (e^{x}cos(omega x)+ie^{x}sin(omega x))\ dx=i/(i-omega)e^{x}cos(omega x)-1/(i-omega)e^{x}sin(omega x)+C
and
\int (e^{-x}cos(omega x)+ie^{-x}sin(omega x))\ dx=-1/(1-i omega)e^{-x}cos(omega x)-i/(1-i omega)e^{-x}sin(omega x)+C
Since cos(0)=1 and sin(0)=0 and e^{x}->0 as x->-\infty, this leads to
hat{f}(omega)=i/(i-omega)+1/(1-i omega)
=(i(-i-omega))/((i-omega)(-i-omega))+(1+i omega)/((1-i omega)(1+i omega))
=(1-i omega)/(1+omega^2)+(1+i omega)/(1+omega^2)=2/(1+omega^2)