There are two main ways to implement a programming language:
A compiler transforms the source code into another language. This is usually executable machine code, but it can be another language for which an implementation already exists.
An interpreter is a program that reads source code and evaluates it. Interpreters are typically simpler to implement than compilers, but there is some overhead involved with re-reading the source every time the program is executed.
Many languages adopt a hybrid of these two - for example, Python code is compiled to Python bytecode which is then interpreted. Some languages have both interpreters and compilers available for them.