P86 is correct, I have a 2002 4 cyl Optima.
Remove the 4 bolts that hold the engine cover on.
On top of the engine you will see 2 ignition coils, each one has 1 wire going to it leading to a spark plug.
That's 2 of your plugs, the 3rd & 4th plugs are right under the ignition coils themselves.
2 bolts hold each coil on. I believe it's a 10 mm socket that removes the bolts. Just remove them and pull the coil straight up.
If the plugs are the original Iridium ones you remove them with a 13/16" spark plug socket.
If the plugs are the regular resistor type you remove those with a 5/8" spark plug socket.
Either way you'll need an extension on the socket as the plugs are recessed.
Torque the new plugs to 15 - 21 ft-lbs.