Step 1.
pink-color is arcgis server,
blue-color is arcgis online
some organization have both pink and blue,
some only have pink,
some only have blue.
https://transparentgov.net/json2tree/esri/vendor/mappingsupport/all.html

Step 2.
arcgis server is youself hosted in your server room.
You have full control of it.
It have full function.
You can start, stop, it.
You have to maintain it, upgrade it,
Except you pay in the front for whole esri enterprise package, you don't need to pay extra for use of arcgis server.
Technically most difference is
https://transparentgov.net/json2tree/esri/server/folder.html?org=City+of+Garland%2C+ArcGIS+Online&url=https%3A%2F%2Fmaps2.garlandtx.gov%2Fserver2%2Frest%2Fservices&model=null&arcgis_online_token=&select_folder=23&select_folder_text=PD_CRIME+%3Csup%3EMapServer%3C%2Fsup%3E&select_layer=
arcgis server you can have dynamic map ( arcgis online not allow dynamic map )
allow dynamic legend,
allow map-imager , all these capability is YES

Step 3.
arcgis online is ESRI hosted locate on Amazon's server center.
You NOT have control of it.
NOT full function, only partial function
ESRI only allow you use feature service,
not allow you use dynamic map server, not allow geocoder
You can NOT start, stop, it, ESRI never stop it.
You do not maintain it, ESRI did it.
You do not upgrade it, ESRI did it.
You have to pay credit out of your ESRI account for storage of your data size.
Large data set, you pay more, small data set, you pay less monthly.
Technically most difference is
https://transparentgov.net/json2tree/esri/server/folder.html?org=Huntingdon&url=https%3A%2F%2Fservices3.arcgis.com%2FliWtJPxLI3mlx8pH%2Farcgis%2Frest%2Fservices&model=null&arcgis_online_token=&select_folder=6&select_folder_text=Municipal_Boundaries+%3Csup%3EFeatureServer%3C%2Fsup%3E&select_layer=
arcgis online not allow dynamic map,
not allow dynamic legend,
not allow map-imager , all these capability is X (no)

Step 4.
arcgis server you have your own domain name, ( arcgis online you do not )
for example:
gis.baycountyfl.gov
is your own domain name
https://transparentgov.net/json2tree/esri/server/folder.html?org=Bay+County+GIS&url=https%3A%2F%2Fgis.baycountyfl.gov%2Farcgis%2Frest%2Fservices&model=null&arcgis_online_token=&select_folder=74&select_folder_text=Parker+%3Csup%3EMapServer%3C%2Fsup%3E&select_layer=2&select_layer_text=2+%26%23x21E2%3B+Sign+Inventory+%3Csup%3EFeature+Layer%3Csub%3E+esriGeometryPoint%3C%2Fsub%3E%3C%2Fsup%3E

Step 5.
arcgis online, you do NOT have a domain name,
the domain name is always
service0-9.arcgis.com/your-identifier/
you have a uniqure identifier after arcgis.com
https://transparentgov.net/json2tree/esri/server/folder.html?org=Huntingdon&url=https%3A%2F%2Fservices3.arcgis.com%2FliWtJPxLI3mlx8pH%2Farcgis%2Frest%2Fservices&model=null&arcgis_online_token=

Step 6.
arcgis online NOT allow you upload your customized geocoder,
arcgis server allow you upload your customized geocoder,
if you see geocode, it must be arcgis server, can not be arcgis online.
for example
I see geocode locator, geocode server,
it must be arcgis server, have customized domain, maps.austintexas.gov
It can not be arcgis online, with shared domain service.arcgis.com/identifier
https://transparentgov.net/json2tree/esri/server/folder2.html?org=https%3A%2F%2Fmaps.austintexas.gov%2Farcgis%2Frest%2Fservices&url=https%3A%2F%2Fmaps.austintexas.gov%2Farcgis%2Frest%2Fservices&arcgis_online_token=&select_folder=88&select_folder_text=COA_Locator+%3Csup%3EGeocodeServer%3C%2Fsup%3E&select_layer=-1&select_layer_text=COA_Locator+%3Csup%3EGeocodeServer%3C%2Fsup%3E

Step 7.
Step 8.
Step 9.
Step 10.
Step 11.
Step 12.
Step 13.
Step 14.
Step 15.
Step 16.
Step 17.
Step 18.
Step 19.
Step 20.
Step 21.
Step 22.
Step 23.
Step 24.
Step 25.
Step 26.
Step 27.
Step 28.
Step 29.