State dinners are the glitizest of official functions, where everyone wants an invite, wardrobes and the guest list are scrutinized, toasts are made and bands play everything from the Star-Spangled Banner to the theme from "Beverly Hills Cop" (more on that later).

President Obama attended three during his eight-day trip to Asia -- in Japan, Malaysia and the Philippines. (There was no state dinner held in Korea.) So what is an official state dinner and when do they happen?

Champagne is poured for U.S. President Barack Obama (2nd L) and Japan's Emperor Akihito (R) during the Japan State Dinner at the Imperial Palace in Tokyo, April 24, 2014. REUTERS/Larry Downing

When President Obama goes abroad for an official state visit he gets a state dinner. A state visit typically involves a formal greeting at the airport, a visit to the residence of the head of state, a visit to some type of business or university that's not regarded as an overtly political meeting. Plus the dinner, said Erik Goldstein, a professor of international relations at Boston University. If President Obama travels abroad simply for meetings or a summit, it is not a state visit. So he can keep the tuxedo at home because there won't be a state dinner.

So what happens at these dinners? Well, the dinner is a way to showcase that the country is playing host to one of the world's most coveted guests. And the people invited tend to be bigwigs -- chief justices, ambassadors, politicians and the like.

There's lots of pomp and gifts are usually exchanged. In the Philippines, President Benigno Aquino conferred on President Obama the Order of the Sikatuna, an honor that has been bestowed on U.S. presidents dating back to Dwight D. Eisenhower. It's a national order of diplomatic merit only given to people who have rendered exceptional services to the country.

There are also toasts and public niceties. This trip allowed Obama to sound a personal note. In Japan, President Obama spoke about coming to Japan as a six-year-old and said he has "never forgotten the kindness that the Japanese people showed me." In Malaysia, Obama recalled his mother's love of the art of batik and how it gave her a window into the lives of others. In the Philippines, he paid homage to Aquino's family. And, like most people who give toasts, he tried to crack a joke or two.

"To all you men out there, you look very good, but I think you'll agree that the women outshine you," President Obama said.

Then, of course, there is the food. In Japan, "Ice Cream in the image of Mt. Fuji" was served, along with a 1994 Chateau Margaux (average price $467 a bottle). In Malaysia it was Malay fusion food including spiced seared ahi tuna with wasabi cream and other "not so spicy" things, according to an official. In the Philippines, one of the appetizers was lobster kilawin carpaccio with baby sprouts and fiddle fern with kalamansi jam.

And the music. Each dinner featured an orchestra. In the Philippines Obama walked the red carpet to the theme from "Beverly Hills Cop." 

Although he went to three in 10 days, President Obama rarely hosts state dinners; there have only been seven stateside so far during his tenure. The most recent was earlier this year for French President Francois Hollande. Those events are mainly viewed as an opportunity to see who is dressed well, who is on the guest list and who is performing (Beyonce, in 2010). Past attendees have included Eva Longoria, Whoopi Goldberg, Blair Underwood  and Mark Sanchez. Plus two guests the White House would rather forget: party crashers, gubernatorial candidate and aspiring reality television stars Tareq and Michaele Salahi.