They move to tax havens and/or work with specialists to set up sophisticated tax structures. Sometimes the structures aren't good enough and fail, although that is in some cases due to recklessness or improper behaviour by the person and not necessarily a flaw in the structure.