Hi Karen! This is a great question as Dining at Walt Disney World Resort is almost as popular as some of the beloved attractions.
Dining hours do vary by restaurant, and there are basically no set rules. Some are owned and operated by Disney so they can open and close as various elements change. Some locations are owned by 3rd party companies (Yak and Yeti; Rainforest Cafe) so they do have contracts of being open during set hours. There are some restaurants that close an hour or two before the park does (Columbia Harbor House) and there are some that are open well past the posted closing time of the park that day (Casey's Corner). The majority of sit-down restaurants do accept reservations during Extra Magic Hours and Special Ticketed Events like Mickey's Very Merry Christmas Party (Be Our Guest, Cinderella's Royal Table). However food booths for Epcot events usually do close during evening Extra Magic Hours.
The best way to double check a restaurants hours would be to pull up the
Park Hours Operating Schedule as well as the
individual restaurant page for a specific venue. Once on that locations page, look all the way to the right. Under the blue box that says "Check Availability" and above the park map pinpointing the location, you'll see the hours for that location for today. Click the tiny Calendar icon by today's date and start playing around. Depending on the restaurant chosen you'll start to notice if it stays open later or earlier depending on the parks hours as well as Extra Magic Hours.
When in the parks the best way to find an open dining location (especially during Extra Magic Hours) is the My Disney Experience App. It will even guide you from where you are to where the food is on a GPS enabled map!
I hope this helped a bit, Karen, and we'll see you real soon!
~Kristen