Welcome anoopsharma160,
Thanks for using the Apple Support Communities! We understand that when plugging in your computer to an external monitor the CPU picks up. Let’s take a look and see what we can do. We're happy to help!
Let's first try to perform an SMC reset on your device. This resource will help you perform that reset. We also recommend making sure your MacBook Pro is on a flat surface when the fans turn on. This will ensure the cooling system of your Mac will work properly.
How to reset the SMC of your Mac
Next, let's try to perform an NVRAM or PRAM reset on your device. This resource gathered will help.
Reset NVRAM or PRAM on your Mac
Lastly, let's check Activity Monitor to see what processes are using your CPU the most making the fans turn on and your computer to heat up.
Activity Monitor User Guide
Have a great day!