Most Westerners are not used to sitting on the floor, however, in Japan sitting upright on the floor is common in many situations. For example, meals are traditionally held on a tatami floor around a low table. Sitting on the floor is also customary during the tea ceremony and other traditional events.
The formal way of sitting for both genders is kneeling (seiza) as shown on the picture below. People who are not used to sit in seiza style may become uncomfortable after a few minutes. Foreigners are not usually expected to be able to sit in seiza style for a long time, and an increasing number of Japanese people themselves are not able to do so either.
In casual situations, men usually sit cross-legged, while women with both legs to one side. The former sitting style is considered exclusively male, while the latter is considered exclusively female.
The most important guest sits on the honored seat (kamiza) which is located farthest from the entrance. If there is a tokonoma in the room, the guest should be seated in front of it. The host or least important person is supposed to sit next to the entrance (shimoza).