What do if arduino reset itself?

KarlaSvalina:
Will I connect - of cap to gnd and + of cap to reset?

Correct. Note that this is only about preventing resets when you open Serial Monitor. It will not help with resets caused by bugs in your code or insufficient power supply.

Note that you will need to remove the capacitor to upload a new sketch to your Arduino board.