Exponential Sums and their Applications