I want to offer customers a discount on one product, if they purchase another one. How can I do that?

First of all, to create copies of those products, which you would like to provide with discounts. Herewith you should initially set more low prices for them taking into account discount, which you want to offer.
After that, you need to create offers on a page Offers and indicate products as targets by buying which additional products will be offered with discount. Or you can leave a section targets empty in a case if you would like to offer extra products with discount for any buying product. And the products with discounted prices for which copies were created should be indicated as products to upsell.
The way how to hide products proposed as upsell from the whole list of products for sale on web store is described here.