I assume that you are talking about the economic stimulus packages passed by the US government to try to get the US out of the crisis that began in 2008. If so, the relationship between this stimulus and the deficit is that the spending for economic stimulus greatly increased the federal government's deficit.
An economic stimulus typically consists of increased government spending. The government gives people jobs by spending government funds on things like road construction. These people (it is hoped) will spend the money they earn, thereby creating economic activity. This will get the economy through bad times.
The problem is that this means the government has to spend a lot of money. It can't raise taxes to get that money (because that would take money away from people and make them able to buy less in the way of goods and services) so it has to run a deficit.
As the government spent on economic stimulus, the deficit exploded. This is the relationship between economic stimulus and the government's deficit.