.arduino - I think - is where sketchbook is (not sure, don't use linux)
.arduino15 is where board packages and stuff get installed to (and which one should generally never touch, except maybe to delete the contents when board manager packages get screwed up)
The IDE didn't create a .arduino folder on my Linux system. I'm guessing Arduino 1.0.x would create a ~/.arduino folder, but Arduino 1.5.x and newer should only create the ~/.arduino15 folder and the ~/Arduino folder.
There is a setting within the Arduion IDE /file/preferences. It contains a few things that are helpful. One is the location of your sketches. And sketches are the programs that you write. Usually a .ino file. Sketches go into a folder(directory) of the same name.
Libraries are a difficult matter IMHO The latest Arduino install , A/O 6/23/2020, also created a folder titled libraries (I Think) with just a readme file in it. It was created under my ~\Arduino folder.. Not quite sure when it gets created, it just showed up.
I also only have a ~.arduino15 and a ~\Arduino folder.
Re libraries, they somewhat follow the sketches pattern in that they reside within a sub directory mostly titled the same though not always. And what I am about to illustrate is probably incorrect in a lot of ways, but I am just trying to give you some idea.
An example is #include servo.h
Which might look for a folder structure like this
~\Arduino\libraries\servo\src\servo.h,,,,,,along with a few other files
Or
~\Arduino\libraries\Adafrui_Unified_Servo\servo\src\servo.h,,,,,,along with a few other files
You get this when you do a "manage library" within the Arduino IDE.