A reasonable question when one is unfamiliar with how a computer operates. The answer does depend on what kind of computer one is discussing. Computers range from small systems, like a Raspberry Pi or BBC Micro Bit (or even smaller) up to a large multiprocessor supercomputer.
In a normal typical computer an assembler is just a normal program, like any other application (or App) and it lives in the system in the same places as other Apps. There is nothing special about an assembler. An assembler is just like a compiler. It is a program that translates a sequence of statements described in one language (or notation) to an equivalent sequence in another language (or notation). A Java compiler would convert Java program statements into the equivalent sequence in (Java) Machine Code. An assembler for an ARM processor would convert the assembler statements into ARM machine code.
In a typical computer these programs would reside on the disc.
In something like a smartphone these programs would reside on some other form of persistent storage such as the built-in flash memory or a micro-SD card.
Not all computers need to have the assembler run on them. Very few smartphones would have an assembler App installed (but they could - my phone does have assemblers and compilers installed on its SD card!). For small devices the compilers and assemblers reside on and are run on a large computer and the machine code is generated there. The resulting file of machine code is then downloaded or installed on the computer.
You can thus have machine code without having any assembler on the same computer. The assembly was done somewhere else.
The answer is thus, the assembler could be anywhere!