Carrie,
Extra Magic Hours are, as you have correctly identified, a special perk just for Disney resort guests. How they can tell that you are a resort guest, and someone else is not, is by your tickets. A resort guest's tickets (typically which are imprinted into your hotel room key, which Disney refers to as your
Key to the Magic card), tell the turnstiles that you are a guest. That Key to the Magic card also, as your room key, serves as that Resort Guest ID card.
On a recent trip I had tickets that were separate from the Resort Key. No problem. Since I had my room key with me as well, I was fine.
To answer your exit/reentry question, no, you will not have to exit the park, and then re-enter to prove you are a resort guest. Disney staff simply assure that only park guests are in the park by checking IDs throughout the park. It is not a hassle in any way, so don't think that it will get in the way of the fun. Usually they use wrist bands, though they try out other methods occasionally.
Have a magical vacation!