I often find myself unable to successfully compile a program, so I end up using apt-get to install it.
Don't do that. You have it backward. You should first check if you can install via apt-get, then if you can't, compile from source.
It's good that you know how to use configure/make, etc., but doing so over and over again unnecessarily is not going to provide much opportunity for learning anything more, and it is not going to benefit your system much either. There are more productive uses for your time WRT learning about linux.
I want to learn how programs really work, what really happens when I compile a program.
That is a pretty hefty regress. I'm not saying that to belittle you -- I have the same "why? then why? then why?" predilection, and I think linux is very appealing to people like this. But, to be honest, I don't think there's an answer to this question that is of much value or meaning to people who can't read or write code.
It seems to me you might very well be interested in programming and I'd encourage you to pursue that interest first, and worry about how compilers work later. If you aren't interested in programming, then don't worry about how compilers work.
I want to learn where to find configuration files and how to edit them.
You find them by consulting the documentation for the software you want to configure. There's no hard and fast standard, though obviously there's lots of stuff in
/etc and "hidden" dot directories in $HOME. As for how to edit them, if you mean "what are the rules", linux uses the shell a lot to accomplish system level things, but the configuration for individual applications is usually of a form unique to the application, so again, you have to read the specific documentation.
I want to know more about environment variables as well.
That is a question that can be well addressed within the scope of a wikipedia article. Wikipedia is a great resource for computing questions and the standard there tends to be much higher than it is on the web at large.
I want to learn how mime-types work.
This is similar to the question about environment variables in so far as some casual reading of wikipedia should do it, BUT also sort of like the compiler question in so far as I don't think it is going to be very useful or meaningful to you, currently.
I think installing Arch Linux would be a good thing
From what I know of arch, I think it is potentially a good learning experience. Same with gentoo. Far ahead of both of them in this regard would be Linux From Scratch.
However, I think what I'd recommend over any of that (distro hopping) is, again, programming. If linux is where you're at, either C (which is the native base -- bluntly, all rivers lead to the C eventually, lol) and/or one of perl, python, or ruby. Currently, python seems to be winning popularity contests, but those three are in fact all more-or-less equivalent, so whichever strikes your fancy. Ruby is probably the most generic in form and aimed more at new users than the other two, meaning it is a good first language. Perl has a lot going for it and has been fundamental on linux since forever.
I do not recommend learning via bash or shell programming. You do inevitably need to have a grasp on the shell, but programming wise it lacks a lot of important features and is much more esoteric and fussy (and much less generally useful) than any of perl/python/ruby.
If you live near a city or decent size town, the library system probably has books on introductory programming in C, perl, python and ruby. That's my #1 recommendation, ahead of installing arch or trying to understand apt in depth: get yourself a book and start programming.