In the United States, federal government agencies are usually created through an act of Congress or a presidential action. The US Constitution does not actually have anything specific to say about the creation of government agencies. There are two types of federal agencies: legislative agencies and executive agencies. Each is created through a different process.
Congress has used its authority to pass enabling acts which create legislative agencies. In this specific context, an enabling act is a piece of legislation or statute that grants power to enforce certain laws to a particular entity. It is passed by Congress through the same normal legislative process outlined in Article I, Section 7 of the Constitution. The law typically governing the creation and functions of these agencies is the 1946 Administrative Procedures Act (APA). This law specifically lays out the process by which legislative agencies can propose regulations and conduct their regular activities. Examples of legislative agencies include the Library of Congress, the Federal Election Commission, and the Congressional Budget Office.
Executive agencies are created by the President of the United States. Once again, the Constitution does not explicitly spell out the process for this. However, Article II, Section 2 allows the President to "require the Opinion, in writing, of the principal Officer in each of the executive Departments, upon any Subject relating to the Duties of their respective Offices." Executive agencies grew out of this as a way to aid the executive branch in discharging its duties of enforcing laws. Although these agencies are created by executive orders, they are still governed by the APA. Examples of executive agencies include the Department of Labor, the Department of Homeland Security, and the Department of Education.