A lot of it came from encouraging citizens to buy "war bonds, giving scrap metal to the military, and from increased taxes. They also made factories that would usually make cars make tanks or guns instead.
The United States got its money for World War 1 mainly through the manufacture and sell of armor. The United States also got its money trading rights or clothes and food to the various countries. You can check out http://eh.net/encyclopedia/article/rockoff.wwi for more information.