To setup user defined prices/donations for a product, first create your product and set “User defined price” to “yes”

Select the range for your customers ($0 = no limit)

An input box will now appear next to the add to cart button, allowing the customer to enter a value. If you have set a specific range you should indicate the range somewhere near the button. Values greater than the maximum will result in the price being set at the maximum and vice-versa with the minimum.
The product price will be the default.

Note that you can only have a quantity of 1 in the cart for each donation product so going back and adding a second one will result in a change of the price rather than a second product.