Does the arduino have set memory?

After you write code, even when you put new code in will the old code take up storage/memory on the arduino or does it get wiped and allow you to just keep using the arduino without worrying about their only being a certain amount of code you can put it before it becomes unusable?? Please can i get a response soon, many thanks!

The new sketch writes over the old sketch so you don't need to worry about filling up memory.

You didn't mention which type arduino you are using, but there are limits to how many erase/write cycles the flash memory can tolerate. The atmega328 chip used in the UNO / Nano allows at least 10,000 cycles, and typically will keep working much longer since the manufacturer specifies a minimum guaranteed amount. The internal EEPROM can tolerate at least 100,000 write cycles (and can be read an unlimited number of times), which is more problematic because that can be exceeded fairly quickly if a program gets stuck writing to eeprom constantly.

As a practical matter, most people on here are far more likely to physically damage an arduino by hooking something up incorrectly or writing code that misconfigures an output pin than by loading code 10's of thousands of times.

I'am using an arduino uno and i have already cleared the Eprom just to check. This is great to know! Thank You!