I'm having a great deal of difficulty making the switch from opengl 2, up to 3.1+. Specifically, with shaders.

I've found tons of tutorials, with lots of example shader files, with descriptions of what the files do, but I don't understand the specifics of exactly how they work. Here is an example from one of swiftless's tutorials:

I don't understand how the engine knows what to do with what. From what I can see, apart from the keyword 'in/out/uniform' this defines some variables, and initializes 2 of them on shader creation. I just don't understand how that, translates to gl shader calculations. Anyone know any good resources that focus specifically on line by line shader creation? (Preferably at a more fundamental level)

gl_Position acts just like it does in GL2.
in variables act like generic vertex/normal arrays. When you upload vertex data from your opengl program, you tell it which variable (in_Position,in_Color) to link it to. Each vertex in the array you upload goes to the vertex shader once.
Out variables are like varying variables. They get interpolated and given as INputs in the fragment shader, which knows they're the same because they have the same name.
If you understood GL2 shaders all you need to recognize is that with GL3 there are less hard-coded variables. Instead of using gl_Normal to pass a variable to the fragment shader, you just make your own variable called normal

If you understood GL2 shaders all you need to recognize is that with GL3 there are less hard-coded variables.

Unfortunately for me, I never learned anything about shaders with GL2. The engine I had built, had flat lighting, and diffuse texture support only. Even now, that is all I need to support, but it seems working with the latest opengl version necessitates learning shaders.