probably overheated. check oil and coolant levels like Tony said.
I fear Country Boy is right on the money. Between Phoenix and Flagstaff there are a few major climbs - Sunset Ridge north of Phoenix, Blue Ridge south of Verde Valley, and the 17 mile climb onto the Mogollon Rim north of Verde Valley. Depending on where you were when you started 40 miles would have put you on the fairly mild terrain around the Prescott turnoff, which is not quite so sinister.
Anyway, start with a look at the coolant in the radiator (or surge tank, depending on what make, model, and year car you have. If it is low, top it up. Purified water is good, but in case of serious damage tap water may not make a difference. If you have a helper, have the helper crank the engine while you watch the coolant with the cap off.. If no helper, look for splashes of water around the top of the radiator after you crank it. If the coolant surges out or (worse) pumps as the engine is cranked the head(s) are warped, and the car may need a new engine or at least new heads, which are not cheap. You mention a distributor cap, so the car may not be new enough to be worth a new engine. Good luck.
Either no coolant or low oil. Each can result in expensive repairs.
smoking??? "smoke" from the engine is really steam caused by engine coolant leaking onto a hot engine. You probable blew a coolant hose and lost your coolant. Your engine temperature light should have come on----or the gauge should have gone to red. If you choose to take off the radiator cap to add water be CAREFUL. Hot steam could seriously injure or even kill you.
jumped timing chain
check your oil and coolant levels
Okay was driving to flagstaff (I live in phoenix) After about 40 miles my car stalled on the highway...? I pulled over and it was smoking & now it won't start. I had my start up, alternator & battery checked b4 I left& all where good. My family thinks its either the spark plugs, fuel pump or filter, or the distributer cap. Any ideas that can help me narrow this down ?