Every country has its own criteria for citizenship and the definition depends on the country you are talking about. Generally, citizens are members of a political community and a nation will grant its citizens the right to take part in the civic life and the right to hold government offices and in turn, the citizens must obey the laws of the nation. This applies to the citizens of the United States and US citizenship comes with a lot of rights, duties, and privileges. US citizens may not be deported from the United States for any reason and foreign nationals also can gain US citizenship by meeting a variety of eligibility requirements and by going through a legal process.
Likewise, living in a country may not make you a citizen of that country and all the foreign nationals who live in America are not citizens of the country and people who get into America as non-immigrants must leave the country prior to the expiration of their temporary visas and people who get into the country with immigrant visas will be granted permanent resident status and they may not become citizens of the country until they apply for and obtain US citizenship. Nevertheless, legal residents can live in America as long as they wish to live in the country.
Immigrants who settle in America and obtain Green Cards, will have to pay taxes and abide by the laws of the country and the lawful residents of the United States may own property in America, own businesses and study in the country but they may not be granted the right to vote in federal elections and to hold government offices and to do so they must become citizens of the United States. Such permanent residents or Green Card holders may not be granted all the rights that are being granted to the US citizens but will be granted few rights. Permanent residents who are eligible for US citizenship and who meet all the eligibility requirements may apply for US citizenship and they can enjoy all the rights of US citizens, after becoming citizens of the country.