What is the difference between characteristic impedance and input impedance in transmission lines?
What is the difference between characteristic impedance and input
  impedance in transmission lines?


Characteristic impedance (\$Z_0\$) depends on the transmission line and its physical properties. Mathematically it can be shown that if you know the inductance (L), capacitance (C), resistance (R) and conductance (G) per unit length, \$Z_0\$ is: -

\$\sqrt{\dfrac{R+j\omega L}{G+j\omega C}}\$

And of course these quantities can be deduced from the physical dimensions, dielectric properties (including dielectric losses) and conductivities of the materials used.


  when these quantities are equal?



If you have an infinite line then input impedance = \$Z_0\$
If you terminate a non-infinite line in \$Z_0\$ they are equal
If you terminate the line in an impedance not equal to \$Z_0\$ then, providing you choose the correct line length, the impedances can be made equal.


This last bullet point makes use of the relationship between input impedance, load impedance and \$Z_0\$ in the following way: -



\$V_P\$ is velocity of propagation as a ratio to speed of light and, for normal coax cables is about 0.7 but is \$Z_0\$ value dependent.