Theory of Tides