Residency rules vary from state to state. For example, if you spend more than a certain number of days in some states, you're considered a resident whether it makes sense to you or not.
It's best to check with your State Department of Revenue for specific residency rules, especially as they apply to your particular situation. In the meantime, use the examples below as a general guideline.