Of course the answer really depends on who you ask and their perspective. The term "government" refers to the group of people that exercise power over a country or other group of people whether by their consent, through a power they wield, etc. It can be as large as the huge bureaucracy that comes to exist in most national governments over time or as small as one person in charge of a club or other small organization.
Its purpose again will depend on what it is governing. In the case of the United States, there are also many perspectives on what the role of government should be. Some would argue its main role is to provide for the national defense. Others would argue that it should provide for the poor and provide a social safety net.