I want to stay in the UK for 6 months on a tourist visa. Then I will leave and return for another 6 months. What is the minimum time I must be out of the country before re-entering?
There's no fixed rule, unlike say the Schengen Area. However, you must convince the entry clearance officer that you are not intending to "live in the UK by repeat visits".
Common wisdom is that this means you should spend as much time out of the UK as you do in it, but again this isn't a hard and fast rule. If you have a good reason to visit again, and can show strong ties to your home country, you're more likely to be successful with your second visa application.
For reference, the same rules apply to non-EEA citizens who don't need visitor visas, such as US citizens. In that case it'd be the border officer who makes the decision instead of the entry clearance officer at UK Visas and Immigration.