How to know whether Mac has SSD or HDD installed
Apple Menu -> About This Mac -> System Report
Select Storage in the Hardware section
Select "Macintosh HD" on top




Alternatively you can run system_profiler SPSerialATADataType or system_profiler SPStorageDataType in Terminal which more or less gives you the same information