Slowly bow your upper body and lower your head. How much for bowing will depend on whom you are waiing.
When being wai-ed to, you will be considered impolite if you don't return a wai or at least acknowledge the wai. Sometimes it is difficult to return a wai when you are carrying a lot of bags or in the middle of stuffing, you can nod or say sawasdee khrap / kha. Only monks and royalty do not need to return a wai, however.