When you move to another state or any place where you'll need to attend a new school you'll let the school you currently go to know about the move and transfer.
They will assist you in helping you file the paperwork to transfer to the new school.
If you can it's best to wait until after the school year ends to transfer to a different school because then during the summer you just move to your new residence and when school starts again you enroll the student into that new school.
But you can transfer schools even during the school year but you'll need to submit paperwork to the new school and then let the old school know that you're moving and that the student will be attending the new school.
Your grades and stuff usually do not move to the new school so that's one reason why it's best to wait until the school year finishes to move schools if possible.