I don't understand what is function of run and submit option while submitting

After writing the code I click run button it give Run time error, but when I Submitted same code without any change it executed
can anyone explain uses of run and submit?
Thanks!