The circuit in figure 1 is a unity gain buffer, ie it has a gain of 1.
The circuit in figure 2 will not work as drawn. It needs two resistors, one between the output and inverting (-) input of the LM324, the other between the circuit input and the inverting input of the LM324.
THe circuits are also drawn unconventionally with the +ve supply at the bottom of the drawing and the -ve supply at the top. they should be the other way up.