Consumer and producer surplus

What is the differences between consumer surplus and producer surplus? And how are they measured?