The reaction of isatin with a base such as potassium hydroxidehydrolyses the amide bond to give the keto-acid 2. This intermediate can be isolated, but is typically not. A ketone (or aldehyde) will react with the aniline to give the imine (3) and the enamine (4). The enamine will cyclize and dehydrate to give the desired quinoline (5).
^Bergstrom, F. W. (1944). "Heterocyclic Nitrogen Compounds. Part IIA. Hexacyclic Compounds: Pyridine, Quinoline, and Isoquinoline". Chem. Rev.35 (2): 77–277. doi:10.1021/cr60111a001.