I am trying to learn about how various "parts" of a website/app interact and receive some practical guidance on creating a dynamic website/app that work together. I am looking for books, free online courses, tutorials, and hands-on lessons (etc.) to help gain this knowledge.

For example, what languages are common for front-end development? How do those languages interact? What is a web server and how does it tie into everything else? What languages must I learn to create a database of data? What if I want to build web applications that rely on those databases? How do back-end programming languages interact with front-end languages (specifically)? If I write code in, say, Ruby, how do I use that code on a website? (e.g., the equivalent in JavaScript would be putting it inside script tags or referencing the .js file in my HTML file). What compilers should I use? What web hosts support advanced back-end programming? What must I do to set up these web hosts to react properly? On the mobile side, how does the mobile application interact with the back-end? What is typically used to create and run mobile applications? Maybe a case study: if I were to create an app/website like Lyft, what would everything look like from an architectural standpoint, what languages would be necessary, how would I create it, etc.?

Additionally, some info on best practices would help. For example, explanations and advice on using AJAX and REST principles.

I tried to list a bunch of questions that are somewhat related. I know answers to some of them, but there are a lot of questions that I don't even know to ask. Some up-to-date resources would be highly preferred. Resources that explain how things work are preferred over very advanced technical documents. I appreciate any support.