What does Fourier transform specify? I have learned that every signal can be expressed as a sum of infinite number of sine and cosine waves, and that the Fourier transform gives the weights of the waves at each frequency. Does the Fourier transform give the weight of sine wave or does it give the weight of cosine wave or are both the weights same?
 A: No both weights don't have to be the same. In particular for an even function you only get nonzero weights for the cos terms. All the sin terms have weight 0. What you should do is break up into an even an odd function, then break those up into cos and sin respectively. Then add them back up. Alternatively you can go straight to exponential, but you seem to be describing a real signal not a complex variable one.
A: One could image a function being composed of a bunch of sine and cosine functions. Perhaps even an infinite number of them. This is what the Fourier series is.
The Fourier Cosine and Fourier Sine transforms can be used to calculate the coefficients for cosine an sine factors respectively. 
The Fourier Transform is a combination of both of these. Note the relationship between complex exponentials and trigonometry.
The Fourier transform will give you the coefficients, which represent the frequencies of these periodic functions.
This visualization shows this really well.
To get a better sense of this, check out how the Fourier Transform is used in image processing. This page shows what happens when some simple images with periodic patterns have the transform applied to it.
