Here is what we do, and the reasons behind it, as we dismiss class:
First, we all go to seiza (literally translated - "proper way (of sitting)" and take our belts off. Removing the belts at the end of class reminds the student that one's mastery of the principles of karate lies not in the color of the belt, but in the content of one's character. Additionally, we are all reminded that karate practice is appropriate only inside the dojo and at home.
We all make a popping noise with our belts because, well, it sounds cool.
We recite together "Karate is my secret, and I will not display it publicly." This again serves to remind us that karate is for the benefit of the person practicing it, to make them better at life. It is not intended to impress our friends, to make people "afraid" or "intimidated" by us, and we ought never "show off" our karate in reckless ways.
We all stand together, with our belt folded neatly in one hand.
We recite together in Japanese "Karate Ni Sente Nashi," then recite its English equivalent, "there is no first attack in karate."
The teacher asks, "Why do we bow?" The class responds with "to show respect." The teacher then says "Arigato Gozaimasu," which means, "thank you very much." The teacher then says "O Yasumi Nasai," which means "good night."
After class, it is appropriate for the student to approach the teacher, bow, then say, "Domo Arigato Gozaimasu," to which the teacher responds "Do Itashimashite."