I used to just compile my tex files using overleaf, which took care of everything under the hood. Now I'm trying to figure out what the different programs do. I know that e.g. Texlive and MikTex perform the same functionality, and so do pdflatex and LuaTex, and then there is latexmk (which is a make system, not sure what that is). It seems pdflatex is a compiler, but then I'm not sure what TeXLive is, though I've read it's just a set of libraries.
I haven't read any overview of this, so hopefully it can be clarified: What are the functionalities of programs like TexLive, pdfLatex, Latexmk? How do they relate to each other? Maybe one way to clarify this would be to explain how these different programs get called when one compiles a .tex file using an IDE like overleaf.