The Arduino IDE does a huge amount of work, behind the scenes, under the covers, and elsewhere, to make your life easier – provided you stick with that IDE.
As soon as you migrate to any other (proper) IDE, confusion reigns.
Thanks to the Arduino IDE, some people think that a library is just a header file, for example.
If you are interested in what the Arduino does for you, I wrote it up at Tutorial for creating multi cpp file arduino project - #36 by normandunbar - might be useful.
Cheers,
Norm.