I have done this before from BOS to FRA and back.
It takes 30K miles to print out one upgrade voucher for use on LH. The upgrade voucher is good for one flight segment only! This means if you were flying from BOS to DUS via FRA, the voucher would only upgrade the BOS-FRA segment. You would be in coach the FRA-DUS segment.
In order to use the voucher, you need to be sure your ticket is booked under the LH flight #. It can't be booked under a UA# or another code share. You also need to be sure you are ticketed in the proper upgradable fare. Deep discounted coach cannot be upgraded.
Once you have you have your ticket on LH, you can call UA and tell them you want to upgrade. They will re-create the itinerary in UA's system and issue you however many vouchers you want for 30K miles each.
The nice thing about using miles versus SWU's is they can clear ahead of time. Once you have your voucher, you can call UA and request the upgrade. There is no waitlist, but if it is available when you call you will get a confirmed seat.
When I last did this, the upgrade was not available at the time of booking. So I kept calling back. I don't think you are supposed to do it...but I did it anyway and finally managed to secure my upgrade in advance.
If you don't have an upgrade confirmed ahead of time, I recommend checking in as early as possible (at least 3 hours) to get on the waitlist at the airport.