How do I create product variants? I have a product (for example, "Desk") which has two attributes (size and life). Size has the values small, medium, and large. Life has the values 7 years and 10 years.

The price is different for each variation. How can I change the price for each variation?
You would need to use the Ubercart Attributes module, which is included in the Ubercart core module. From the Ubercart user guide:


  Products are not created equally, and in some cases the customer gets
  to decide the type of product they want. For example, your store may
  sell t-shirts, and the customer may find a design they like but need
  to get it in a certain size. In a situation like this, you will need
  to take advantage of the product attribute system in Ubercart. It lets
  you define attributes (like size), give them options (like small,
  medium, and large), and enable attributes and options on a per-product
  basis. For an example, check out the Ubercart Beanie on the Livetest.


The module allows you to set different prices per attribute and it is not very difficult to setup really.

Having said that, I prefer the Drupal Commerce way of handling product variations.