Theory:

In the process of neutralisation, the chemical reaction occurs when an acid and a base are combined to form a salt. Neutralisation is an exothermic reaction, which means that the reaction mixture heats up.
Similarly, let's see the reaction of phenolphthalein with acid and base.
 
shutterstock_1573400206.jpg
In a beaker, diluted hydrochloric acid \(HCl\) has been taken. And a few drops of phenolphthalein is mixed into the solution, which will act as an indicator. Here, the colour of the solution remains unchanged.
 
shutterstock_663997309.jpg

Observation: Now the Sodium hydroxide solution is added in the same beaker drop by drop continuously till the pink colour appears.

shutterstock_1477183307.jpg

After a certain amount of \(NaOH\) is added to the solution, if we add more \(NaOH\) to it the colour remains the same. When we add more of \(HCl\) to the solution the pink colour turns colourless again. Now, the solution is neutralized.
 
Result: Phenolphthalein gives pink colour if it is treated with basic solutions \(NaOH\), and it remains unchanged with acidic solutions \(HCl\).
Note:
Indicator: Phenolphthalein (Colorless)
In acid solution: The colour remains the same.
In basic solution: The colour changes to pink.