One benefit of staying at a Disney resort is that you can take advantage of extra magic hours (EMH) in the parks. Each day, one park opens an hour early or stays open three hours late for resort guests only. When you arrive at the park for EMH, you'll be asked to show your resort room key. Guests who are taking advantage of evening extra magic hours will be asked to show their room key when they enter the park if they enter after closing time. They'll also be asked to show their room key when the enter attractions or restaurants. You do not need to exit the park at closing and re-enter if you are already in an EMH park for evening hours, just show your key.
I was recently asked if you can remain in a park that's having evening EMH if you're not a resort guest. This is perfectly okay, but you won't be able to visit any of the attractions or buy food. If you're already eating when EMH starts, you won't be asked to leave and are welcome to finish your meal. You'll also be allowed to ride an attraction if you're waiting in line when the park closes. Unless it's a ticketed event like Mickey's Very Merry Christmas Party, in which case you'll be ushered out of the park relatively quickly if you don't have a ticket, you can wander around pretty freely or just sit on a bench and people watch. You can also go into the stores and shop.
I like to avoid the rush out of the parks, so when I stay off site, I don't automatically leave the park when EMH starts. Instead, I usually sit and relax for an hour or so and then slowly make my way down Main Street, maybe doing a bit of shopping while the stores are less crowded. As I understand it, the official policy is that non-resort guests can't buy food once EMH starts, but I've done it. I haven't personally stayed the entire three hours of EMH, but I know people who have.