Web3 Foundation offers grants for open source software development and research around Substrate, Polkadot, and Kusama.
Applications and deliveries are tracked transparently on GitHub and disbursed in BTC, USDT or DAI. However, you can also apply in private, get paid out in fiat and seek funding above the regular limits ($30,000 for first-time applications and $100,000 for follow-up ones), if needed.
More information regarding requirements, the application process, deliveries, etc., can be found in the Grants Program README. For guidance, there is also a list of previously accepted applications and a list of frequently asked questions.
Alternative Funding Sources
The Polkadot Treasury is a pot of on-chain funds collected through transaction fees, slashing, staking inefficiencies, etc. The funds held in the treasury can be spent on spending proposals. Both Polkadot and Kusama offer everyone the opportunity to apply for funding via the treasury. See:
Due to high demand and spamming issues, the Kusama faucet is no longer in operation. The Web3 Foundation has considered new ways to distribute KSM for people who need KSM to build.
Other Grant Programs
Below is a list of other grant programs in the Polkadot/Substrate ecosystem: