It differs per state/school; however, most states do show some preference for in-state applicants; however, I believe that you can apply to be considered a resident at the time of application if you're working on your residency and will be a resident upon time of matriculation.
For example, in Texas, public medical schools must reserve 90% of their seats for in-state applicants - though this case is a bit extreme compared to other states.