We discuss polymer adsorption in a poor solvent. For a single chain we find a wetting transition on an attractive wall when the thermal correlation length xi is of the order of the adsorption length D. If D is larger than xi, for weak adsorption, the polymer chain partially wets the solid surface in the same way as a small liquid drop; if D is smaller than xi, strong adsorption, the chain forms a flat pancake of thickness D. The adsorption of a polymer solution in a poor solvent is considered only when the chains wet the surface. At very low bulk concentration the adsorbed chains form a two dimensional dilute polymer solution which is either in a poor solvent or in a good solvent depending on the value of the attractive excluded volume. When this two dimensional solution is in a poor solvent it undergoes a first order demixing transition analogous to the so-called prewetting transition. At a higher bulk concentration the surface layer becomes continuous, its thickness grows and diverges when the bulk concentration reaches the coexistence curve. We also study the wetting transition of the polymer solution. These results can be applied to diblock copolymer adsorption in a selective solvent. The prewetting transition can also exist in this case if the soluble block is not too large.