* Herr: This is the equivalent of "Mr." You would use it before a man's last name (e.g., "Herr Schmidt"). This is the most common and generally safe formal address.
* Herr Doktor: If the man is a doctor, you use "Herr Doktor" followed by his last name (e.g., "Herr Doktor Schmidt"). This is a title, not just a polite form of address. Similar titles exist for other professions (e.g., Herr Professor).
There's no single equivalent to the informal, slightly more respectful "sir" used in English. You would generally avoid direct address unless the situation demands it (like addressing a police officer or someone of authority). Instead, you would use polite phrasing like "Entschuldigen Sie" (Excuse me) or "Bitte" (Please) to begin a request.