The DAAD (German Academic Exchange Service) offers funding opportunities both for Germans abroad and for international students in Germany. In most cases, students can be funded from the Master's phase onwards. However, there are also opportunities to have shorter stays or special projects funded.
You can find information in the DAAD scholarship database. It is advisable to apply for scholarships early (about one year in advance)!