The management of your affairs to minimise the tax burden within the regulations and law of a particular country. Tax avoidance is therefore completely legal as opposed to Tax evasion, which is not.
This sounds illegal, but it isn't. Tax avoidance is the clever management of your affairs to keep your company or personal tax bill to a minimum. Tax evasion is the illegal one!