A resident is a person who lives within the boundaries of a governmental unit however defined and qualifies for the services provided by that unit.
Under the law, you are a resident of whereever you say you live, but some rights and services have specific residency requirements. For example, you often must be a resident for a specified period to register to vote. Some states have residency requirements to qualify for in-state tuition at state universities. Similarly public schools sometimes require proof of residency to insure that its students live within the school district.