can I install the ArcGIS software on an external hard disk, what needs to be installed on the computer's internal disk?
Not recommended.
It has been a while since I've verified, but yes ArcGIS can be installed to other than the Windows %SYSTEMDRIVE% drive, usually C: But you will need to use a fast external SSD with USB 3.1 or ThunderBolt with a reserved Drive letter assignment (via DISKMGMT.MSC) -- a flash drive or old external USB 2.0/3.0 HDD will not cut it.
But be warned, it is a nightmare to uninstall ArcGIS later should the external drive fail, or be lost, or get assigned a different Drive letter assignment. I can guarantee you will end up reinstalling your OS if you have to manually uninstall ArcGIS!
And, if done this way (a Silent, custom installation via a Command or PS window [1]) , I would not attempt to split the install to the local C: drive, just create a folder "X:\Program Files (x86)" and "X:\Program Files" if X is the Drive letter reservation you make. And perform the command line silent installation to that INSTALLDIR=, including pointing the Python INSTALLDIR1= there.
Windows registry, WinSxS manifests and Global Assembly Cache will go onto the internal %SYSTEMDRIVE% drive. While each user's system %USERPROFILE% (to their CSIDL_PERSONAL, CSIDL_MYDOCUMENTS) will hold the ArcGIS default profile used for your Map projects, symbology, and scratch FGDBs, along with some configuration going into the %APPDATA% directory.
In short it gets messy (ArcGIS Pro is cleaner) to split the installation to a drive other than %SYSTEMDRIVE% but an external drive is no different than a secondary HDD except for being slower--and you can throw a high end SSD and USB 3.1 or ThunderBolt capable hardware at that.
=-ref-=
[1] Installing ArcGIS Desktop silently—Help | ArcGIS Desktop
Actually, I never install application software on C: -- Only Microsoft apps are allowed on my C: drive, which I limit to 100-200Gb. My Esri installs are always in a D:\Esri folder (directories with spaces in them make me break out in hives).
That said, I only install application software and data on internal disks. External disks are for archiving and transfer, not for GIS data or software.