It is trivial to "xerox" the code on an Arduino onto another board - the bootloader is capable of reading out the contents of the flash (it does this after uploading to make sure the code was uploaded successfully). But that's raw machine code - you can't get back to the C code from that, and doing anything with it other than copying it onto another chip is tedious, time-consuming work for an expert.Depending on the board (there is no such thing as an Arduino Duo - maybe you meant due) there are various code security facilities available (lockbits on the AVRs, I don't use the SAM boards like the Due/zero so not sure how they do it); depending on the microcontroller that the specific board uses; these generally complicate the process of uploading and reprogramming. It is also not perfect - there are firms that specialize in glitching parts in order to bypass these protections. That said, we very often get people who clearly have little experience asking this question. I don't mean offence by this, but by the time you are at a level of skill where you could write code that other people would consider worth ripping off, you will have no trouble figuring out how to use the code protection facilities from reading the relevant section of the datasheet.
In general, "securing" the program memory of any arduino-class board will involve removing the bootloader and programming the processor with an external programmer instead. There are "secure bootloaders", but they tend not to be open source, and the bootloaders that arduino does use always permit the program memory to be read (for "verification" purposes after programming, mostly.)
how would you run it without a bootloader, and how would I remove the bootloader.
The bootloader isn't needed at all to run sketches, it doesn't provide any "services" other than uploading.You can use a JTAG (or maybe SWD - they tended to be handled by the same boxes) like an "Atmel ICE", or "Segger J-Link."
I know it is possible, I do not know right now
... one of my main concerns is if someone is able to get the code from the Arduino and be able to turn it into the original code. How could I prevent this?