iMac runs from external SSD. How do I use Time Machine to back up the external SSD to the internal HDD?
If the internal hard drive is empty, then you just need to select it in Time Machine settings as the target. There should be no other setup necessary.

If it is not empty, and you cannot empty it, you should partition it first. However, if it is the wrong format, Time Machine will need to wipe it. It needs to be MacOS Extended (Journaled) for Time Machine to use it. I strongly recommend only using it for Time Machine if you don't need the data on it. You can use Disk Utility to wipe it (select the drive and click Erase, set it up with MacOS Extended (Journaled)).