How to save the sketch code after power off

Hellow,

I am really new with arduino
and I was wondering how to save or after I compile a code if I turn off and on the arduino, how can I keep the arduino running the code I just did without uploading the code all over again

Thank You

The code stays when you remove power. When you give it power again it will start running from the beginning the last code that was uploaded to the board.

Exactly as Delta_G wrote, but if you have a problem even though, send a detailed description (eventually with the code).

Think of code as a puzzle book.
when it is turned on, it started to look at things and fills in the pieces.

it does that all the time there is power.

when you turn it off, it loses all the answers, but the puzzle is still there.
if you have setting you applied, they get lost too.

an example would be a garden weather sensor that looks at temperature and humidity, wind direction and speed and soil moisture and that you can connect with your smart phone to tell it when to water. it even posts temperatures and such each hour to some web link.

it does all that for weeks.
then you loose power.
when it comes back on, it starts reading those sensors, gets temperature, soil moisture...post to the web, it does everything you told it to do when you uploaded, but, it does not still have the water schedule you set with your phone.

You can tell it to save certain things, but that is another discussion.