Different economists will give different answers to this. Let us look at some of the most common answers.
Typically, fiscal policy is said to affect GDP by affecting aggregate demand (AD). When the government changes its fiscal policy, it changes how much money people have. For example, if it lowers taxes and increases government spending, it causes people to have more money. When people have more money, they will tend to demand more goods and services. This means AD will rise. According to this theory, when AD rises, GDP will rise as well.
There are some who argue that increasing AD will not change GDP. They believe that the aggregate supply (AS) curve is vertical. If the AS curve is vertical, a change in AD only causes inflation. It does not change GDP.
Finally, there are those who feel that fiscal policy should be used to change AS, not AD. These “supply-side” economists believe that the only way to get economic growth (an increase in GDP) is to increase AS. They believe in tax cuts. These tax cuts, they say, will encourage people to work and invest more because they keep more of what they make (due to lower taxes). This will increase AS and, thereby, GDP.