The right answer is that the governments get the money for the goods and services that they provide from either taxes or borrowed money (debt). Nevertheless, some goverments that do not follow good economical policies may incur in printing money which is not a good practice and create artificial money which translates in inflation. Also goverments may get some money from donations, which is not a normal way but is possible, when the country has suffered a special natural disaster.