ADC pin in MCU how to connect
The first schematic is terminating a 50 ohm impedance transmission line. The capacitor is likely there to provide some filtering of high frequency noise. Unless you're using a 50 ohm transmission line, this solution doesn't apply to you.

The second schematic is using a resistor to limit current through the MCU's protection diodes in the event that the signal is outside the rails. A parallel capacitor bypasses the resistor, improving the high frequency response.

What you use depends on your requirements. If you want to protect the microcontroller against signals outside the rails, a series resistor like R2 in the second schematic is useful, though it will limit its frequency response. The parallel capacitor is only likely to be important if you're measuring high frequency signals.