The various Cabinet offices have been created by Congress. They are constitutional insofar as their functions are constitutional. So, the positions of secretary of state, secretary of defense, and secretary of the treasury are constitutional, while those of secretary of housing and urban development, secretary of transportation, and secretary of agriculture are not.
The Constitution says (Article II, Section 1) that the executive power will be vested in a president of the United States. Other Executive Branch officials are his subordinates. Thus, it is perfectly proper for him to give them orders–so long as what he orders them to do is legal.