Can I setup time machine to backup an external hard drive if I have another external hard drive? I dont have any files on my laptop but on an external hard drive. Or will time machine only work on files in the internal disk.
Time machine can backup all connected drives (internal or external) to the backup destination, assuming that there is appropriate space to do so. You can specifically exclude certain folders or an entire drive in the Time Machine section of System Preferences.
Also note that all the drives should be in an Mac format (GUID or Apple Partition) in order to backup using Time Machine. There are workarounds, but generally speaking they should be this way.