​​​​​​​​P​AN is a Permanent Account Number and TAN stands for Tax Deduction Account Number.
TAN should be obtained by the person responsible to deduct TDS, i.e., the deductor. The deductor is required to quote TAN in all the documents relating to TDS.
However, there is an exception- in case of TDS on purchase of land and building under Section 194-​IA, the deductor is not required to obtain TAN and can use PAN for remitting the TDS.​
Also, in case of TDS on rent as per Section 194-​IB, and TDS on payment of certain sums by Individuals or HUFs as per Section 194M, the deductor can use PAN instead of TAN for remiiting TDS.