What does "frequency" mean for various kinds of signals?
The key insight that Fourier had when he developed Fourier analysis is that any absolutely integrable (thanks Jason R) function can be represented as the weighted sum of sines and cosines.  Explaining why this is true is way beyond the scope of this answer.  I suggest you study Fourier theory to understand this better.