On Google Play, for instance, you need to determine the rules that apply to you, for the combination of your location and each selling location.
Unfortunately this may vary not only by country but by US state.
For the US... Generally speaking, you will need to pay tax wherever you have 'nexus' (a physical presence in that state - e.g. building and/or staff). If you are outside the US that might be nowhere. Things are changing in some states, however, so you need to keep on top of the news here. In particular keep an eye on Arkansas, New York, North Carolina, Rhode Island and Illinois.
For the EU... I am researching this at the moment, but it looks as though you are required to charge and submit VAT on sales once you reach a certain threshold. Again, this is different per country. In most cases it's high enough not to worry unless you're making Angry Birds 2 - BUT in Germany and Spain it is 0 (!)
If you are located in the EU, you are able to register with your home country and charge VAT at their rate, for all EU sales (this changes above a threshold, whereupon you have to register in each country separately).
If you are outside the EU then you can use VOES to avoid having to register in each country: http://bit.ly/O0XDnv
Even if you are a low level seller, this might be worth considering if you are worried about Germany & Spain.
For other countries, guess what - it varies ! Note South America has some 0 threshold countries.
The majority of small-scale app developers seem to be unaware of the above and are doing nothing about sales tax outside their own location (yet selling worldwide). Whilst you'd probably get away with this if your sales are not significant, I wouldn't recommend it if you're selling significant numbers.