OK, suppose you are at a restaurant. You finish the meal and want to leave, but no one brings you the check. What should you do?
The first thing you should do is find a waiter/waitress and raise your hand. If you fail to get their attention, you can call them out "Sumimasen! (excuse me!)." Don't be shy. Many people from the "Western world" says making a loud shout to call a waiter is bad manners, but don't worry, it is quite normal here. I do too, not too loud though.
When the waiter comes, let's ask for the bill. The phrase for that is...
お会計、お願いします。 O-kaikei onegaishimasu. (May I have the check please?)
Kaikei is "check" and o is an honorific suffix. Onegaishimasu means "please."
Onegaishimasu is such a convenient expression when you order food or ask for service. For example,
ハンバーガー お願いします。 Hamba-ga- onegaishimasu. (One hamburger, please.)
お茶 お願いします。 Ocha onegaishimasu. (Can I have some tea please?)
東京駅まで お願いします。 Tokyo eki made onegaishimasu. (To Tokyo Station, please)
When you leave the restaurant, let's say to the restaurant people:
ごちそう様でした。 Gochiso-sama deshita. （Thank you for the meal.)
We use this phrase at home too, after every meal to thank the person who cooked.