In general you do not.
Nearly all executable files are coded in a computer programming language, and then compiled into executable files.
So to modify an executable, you would need the source code for the program, you would modify the source code and then recompile into a NEW version of the executable.
Linux does provide for an executable script file, but these are more scripts than executable files.
Executable means that the file has a series of instructions used to execute a program. Non-executable files are ones that do not have these instructions.
edit
Executable files usually contain a header, which identifies it as an executable file, and a list of commands to be executed by the processor.
An executable file is a stand-alone binary file, in windows the most common executable files are followed by the extension .exe. A corrupted executable file is a one of these stand-alone binaries that either has missing data or data formatted in such away that it cannot be interpreted by the computer. Most of the time these occur because of half downloads or missing data, but in rare occasions it can be caused by third party harmful applications that modify the binary data making it unreadable.
Executable files, data and program resource files are added to the system, configuration files (or registry files) are updated.
Virus can hide in files,folders,the registry,the boot sector,executable progams and documents
difference between executable file and non-executable file in dos
They're .exe files
To block potentially dangerous email attachments from ever getting to your computer.
The main Excel program file (excel.exe) is an executable file, but the workbooks it creates are not executable files.
Computer server system
There are some kinds of files which can be executed in windows :.EXE : executable programs.com : System booter.bat : batch file is a list of executable files which will be executed when the .bat file is called