Just out of curiosity, why not stay at the Grand Canyon itself?
The South Rim of the park has several great lodges ran by Xanterra. Most of them are within walking distance of the rim. While Flagstaff/Williams are the closest towns to the canyon, they are still over an hour drive away. If you intend your canyon visit to be more than a quick out-and-back day trip, than nothing beats staying right at the canyon itself.
Of the park lodges, the historic 1905 El Tovar is the most grand and expensive, Thunderbird and Kachina Lodges have the best views, the historic 1930s Bright Angel lodge is the cheapest and modern Maswik lodge is a good combination of comfort, size and cost (and good parking). You can make reservations online at the link below (make reservations well in advance).
Even if you can’t get a room in a park lodge, there are a number of chain hotels just outside the gate at the little tourist village of Tusayan. I greatly prefer staying in the park, but this would be the second choice if you are planning on really spending some time at the canyon to see all the sights and really take it all in (and maybe do a little hiking).
As for what to do… do you mean what to do at the canyon or in the surrounding area? MrDanger gives some good recommendations for the surrounding area (Wupatki, Sunset Crater and Jerome are my personal favorites). In Flagstaff, I would also add Lowell Observatory (where Pluto was discovered in 1930) and the excellent Museum of Northern Arizona on the north edge of town.
Contrary to what Fel above says, Flagstaff is a great town with many great cafes, several microbrews, frequent festivals and many interesting historic buildings. Beaver Street Brewery, Kathy’s Cafe, Macy Coffee Shop, Oreganos Pizza and Crystal Creek Sandwiches are few of my own favorites, but there are many more. Stop by Babbitt’s Outfitters or Peace Surplus (both downtown) for gear and advice.
As for what to do at the canyon… obviously the main thing is to take in the incredible views. Go to a variety of the different overlooks as each offers a different perspective. Yavapai Point, Grandview and Desertview are my South Rim favorites. You can also take the little shuttle ride along the west side from the lodges to Hermit’s Rest. For a little quiet solitude, try walking along the rim trail away from the lodges. You can also take a half-day mule ride (get reservations!) or take in an IMAX show (in Tusayan). As others have mentioned, there is a train running from Williams (see link below).
Of course, one of the best ways to really experince the canyon is to go down into it a ways and feel it surround you. You should not try going all the way to the bottom and back in a day, but doing the short 1.4 miles down South Kaibab trail to Cedar Ridge will give you incredible views that you don’t get from the rim and probably a good chance of some wildlife. The 3+ miles to Dripping Springs on the Hermit trail is another good hike. With any hiking, wear comfortable shoes, carry lots of water, be ready for a wide range of weather and give yourself lots of time.
Another great thing about the South Rim are all the historic buildings, many designed by famous Fred Harvey / Santa Fe railroad architect Mary Jane Colter. Check out the grand lobby of the El Tovar hotel, the 1905 Hopi House (looks like an indian pueblo), Kolb’s photo studio (often has art exhibits), Desertview Watchtower, and Lookout studio – all very interesting buildings in great settings.
Also I should probably note that most of the info above and that of the other posters refers to the more developed and more visited South Rim of the park. If you are planning on visiting in summer (mid-may to mid-october) I would consider visiting the North Rim of the park instead. It is much less crowded (only one lodge) and at a 1000 feet higher elevation, it is cooler up in the pines. I find the North Rim to be a more pleasant and intimate experience than the often crowded South Rim. Nothing beats sitting on the North Rim lodge patio – right on the very edge – watching the sunset with a glass of wine. Nearby interesting side trips include the excellent Zion and Bryce National Parks. The North Rim is closed mid-Oct to mid-May.
If you are going to the South Rim, the nearest big city with a major airport is Phoenix. But if you are going to the North Rim, it is a bit quicker to fly into Las Vegas. The nearest town to the North Rim is the border twins of Fredonia, AZ and Kanab, UT both of which are pretty small.
Have fun!