Dependent upon the situation, if there is an existing floor finish, the integrity of the existing flooring must be evaluated. If the floor is wood, vinyl or even existing tile, the new tile can be directly placed on the existing surface. First, however, the stability of the existing surface must be evaluated. If the wood, vinyl or tile is loose or broken, and it is obvious from a simply visual inspection that the stability of the base will not allow a stable and firm surface for the new tile, remove the existing material.
There are several manufacturers that produce a product that is specifically designed and engineered to be spread on the top of an existing surface, to allow the installation of a new layer of tile. In many cases, this product is called a thin set product and has bonding characteristics that allow the proper adhesion of this material over the existing material.
I have had excellent success, by installing a layer of cement board, or synthetic base layer sheathing , specifically manufactured for tile installation, over an existing surface. In this case, special fasteners are used to secure the additional layer of material to the lower existing material. The best method, in my opinion, is to pre-drill the new sheathing, and install the sheathing over the existing material with glue and screw method. The glue is important and a good, construction adhesive should be used to provide additional bonding of the newly installed sheathing to the existing base material.
If, it is visually obvious that there is no way that the existing surface can be stabilized and patched to ensure a firm, level and stable surface, simply remove the existing material off the wall or floor. If the existing material is insufficient to allow the installation of a new tile surface, then the adhesion of this existing tile will be compromised and its removal should not be an issue.
Once the existing surface material is removed, the resultant sub-base that remains should be patched with a product specifically manufactured and designed, as a thin set material, to be used under your new tile surface. Again, similar to the material that is used over the top of any existing surface; this material will bond to the sub-base, and is manufactured with characteristics that will be conducive to the installation of a new tile surface over the top.