What is the difference between variable speed drives and variable frequency drives?

Specific to the pump, cavitation is known for causing reduced performance, noise and erosion damage.