It varies from country to country. Some places actually give you the tax back in the shop itself. In all cases you have to fill out a form, details of purchase (like in the receipt) and price. Fill in your address and show your passport or identity card. If you have any doubts as to how to claim your money back the shop should be able to supply you with a tax back leaflet detailing the points where you can claim the purchase tax back.
Some shops in Dublin, like Con's cameras behind grafton st., actually give the tax back on the spot. Dublin airport give you the tax back after you go through security into the duty free. You dont have to show the goods if they are priced under a certain value (I think its around 800 euro). If its above 800 euro you have to show the item at customs before you go through security to get your form stamped. This is a very good system as it means if its a bulky item you can still check it through and not have to carry it on the plane. Coming back through Sydney or any australian airport you also go through security but you have to have the items in your hand luggage to show to claim back tax no matter what the value, which is a nuisance if its a lamp or a snowboard or something bulky. From Italy you have to get the form stamped by customs in the airport before applying via post to get your tax back. If you are leaving Italy by train you get out at Chiasso where the train stops for only 10 minutes to allow everyone to get their forms stamped by customs, then and only then can you apply via post to get your tax back.
The shop where you purchase the item should be able to inform you where/how you can get your money back.