There are a few ways that the budget for the United States is set. Both Congress and the President are involved. First, the president creates a budget and submits it to Congress for approval. This began in 1921 when the Budget and Accounting Act of 1921 required the president to submit the budget. Sometimes, changes are made. Then Congress allocates the different amounts to the different departments.
These departments can include the National Defense, International Affairs, Energy, Agriculture, Education and Transportation, to name a few. There are different sub-agencies within these departments. Each major department allocates money to these subgroups. Sometimes, the budget takes days to agree. Another office assists in the budget. It is called the Office of Management and Budget.