Taking communal hot baths are a popular thing to do when visiting Japan--whether the large bathing area in a hotel or ryokan, or a public bathhouse such as an onsen or sento.
When bathing with other people, there is certain etiquette for maintaining sanitary conditions in the bath. To keep the bath water clean, it is best to wash one's body before entering the bathtub. Especially if you have been sweating, take the time to wash with soap. When doing so, be careful not to splash or spray your neighbor with water or get soap suds on them.
In the bath, it is fine to cover yourself with a hand towel, but don't allow the towel to soak in the hot water. Place it on the edge of the bath to keep it out of the water. If your hair is long, it is best to tie it up to prevent it from soaking in the water.