Did they do the Heil Hitler salute or did they salute like regular soldiers in a Western military? When was Heil Hitler to be used?
The Wehrmacht had differing rules depending on what period of the war. The SS, as near as I can tell, kept with the 'hitler salute' from start to finish.
The Wehrmact, particular the Heer (Army) were a little less willing to go along with this, and the traditional hand-to-head was used until 24 July 1944. On that date, an order was given from Berlin to change to the Nazi salute. By total coincidence (not), that happened to be the week that someone in the Army tried to blow up Hitler with a bomb. The change was supposed to reinforce loyalty to Hitler, as opposed to the parochialism of the Army.
Kriegsmarine and Luftwaffe also were officially ordered on that date to convert to the stiff-arm salute. Just how thoroughly that order was followed is a matter of some anecdotal speculation.
Prior to that date, an order from the Reich Defense Ministry dated 13 Sept 1933 was in force, which required the stiff-arm salute for troops in uniform during the National Anthem, the Horst-Wessel Song, and for greeting civilians such as government members. Out of these requirements, the traditional military salute was normal, though the stiff-arm was acceptable. That said, as the German regulations prohibited saluting in the traditional manner when not wearing headgear, the stiff-arm was occasionally used in its stead for situations such as indoors.