Sorry if this isn't the right place to ask, but have a question about onboard me

Hey everyone, sorry if this isn't the right place to ask, but I had a question regarding onboard memory of Arduinos. I've exhausted all my searches trying to find an answer, but I have found plenty of other resources regarding memory (I just unfortunately can't put all this information together yet with this missing piece).

But basically, can anyone explain to me (or point me to the proper resources) how memory works in regards to programming? I've found an explanation of how the different memory types work in the way of free memory, heap, stack, and static data, but how do you know which data types are stored where? Or alternately, how to you choose where things are saved?

I've found plenty of resources regarding what data types are best for what types of memory, and I've found resources detailing how to optimise program memory using a few different methods, im just not quite sure how to piece this information together yet, like I said. Thanks!

Sorry, seems I found the answers on my own here: PROGMEM - Arduino Reference

And here: Arduino - EEPROM

So by process of elimination, SRAM is written to by default (which is also noted in the progmem reference).