I understand that the Fourier transforn gets you the function which gives the amplitude of each frequency. But I don't understand how that is possible by multiplying it by an exponential. How is that possible?
EDIT: Since my question seems to be unclear: how do you get the amplitude of a frequency f, by integrating it and multiplying it with exp(-i*2*Pi*f) ?
So what is the definition of the Fourier Transform? The definition is as follows: $$F(s)=\int_{-\infty}^{\infty}f(x)\text{e}^{-i2\pi sx}dx$$ What is the definition of the inverse Fourier Transform? It's very similar, and is as follows: $$f(x)=\int_{-\infty}^{\infty}F(s)\text{e}^{i2\pi sx}ds$$ Note that there are other equivalent definitions, but we will work with these.
So where does frequency come into the picture? People often call $s$ the frequency. Integration is "like" a summation. Euler's identify is also relevant: $\text{e}^{ia}=\cos(a) + i\sin(a)$. So $\text{e}^{i2\pi sx}=\cos(2\pi sx)+i\sin(2\pi sx)$. So $2\pi s$ is the frequency of the co/sinusoid. And what is the amplitude of that sinusoid? It's $F(s)$.
The function $F$ is often called the "spectrum" of $f$.
Does this help?