What is the meaning of [Marry in haste, repent at leisure]

This proverbial saying was first expressed in print by William Congreve in his comedy of manners The Old Batchelour, 1693:

Thus grief still treads upon the heels of pleasure:
Married in haste, we may repent at leisure.