This is one of the many methods of indole synthesis. Formally, it is cyclization combined with the elimination of a water molecule. The catalyst is a strong acid. This reaction is probably carried out in boiling ethanol. Try to figure out a mechanism.