A Cabinet department head is appointed by the United States President, but his position must be confirmed by the Senate of the United States. This rule comes from the Appointments Clause of the United States Constitution (Article II, Section 2, Clause 2).
Although the Senate must confirm certain principal officers (including ambassadors, Cabinet secretaries, and federal judges), Congress may by law delegate the Senate's advice and consent role when it comes to inferior officers.