RC Low Pass filter, capacitor in series or in parallel?
Think of the capacitor as having very low resistance at high frequencies and very high resistance at low frequencies.
So in your top diagram the high frequencies zip through the cap to the output while low frequencies have a harder time. So it’s a high pass. It doesn’t make any difference if you put the cap in front of the resistor.
In the bottom diagram the high frequencies are shunted to ground, leaving only the low frequencies to make it to the output. So it’s a low pass.