circuits do what they do because of the values of the Rs, Cs, transistors, and how they are interconnected, and on what the input(s) are. They are not programmed to do what they do, they do it because of the various laws of electronics, like ohms law.
But some circuits are controlled by a controller of some sort, as doing the same job without the controller would involve a more complicated design. This controller, or microcontroller, or microcomputer, or microprocessor is programmed in any one of a number of languages, like C, perl, basic, or in machine language.
.