Choose an appropriate apology, proportional to the degree of guilt. Append "sumimasen" ["excuse me/I'm sorry"].
An interesting and informative video on shazai ("apology") in Japan. The "perpetual ojigi" is a personal favorite, but the "predominantly used by ninja" bow on one knee is also pretty cool ("be wary of approaching enemies!").
Now you too can grovel with the best!