An assembler is a program that acts like a bridge between human-readable assembly code and machine code. It converts the assembly code into the binary machine code that CPU can execute directly.