I know languages like Python are based in others, like C, to improve or modify some basic aspects of the language. So they parse the text you enter and act in reaction of that code.
But how was the first one written? straight in binary?
The first generation of codes used to program the functions of a computer was called machine language or machine code. Machine code is the language a computer really understands on a machine level, being a sequence of 0s and 1s that the computer's controls interprets as instructions electrically.
The second generation of code was called assembly language. Assembly language turns the sequences of 0s and 1s into human words like 'add'. Assembly language is always translated back into machine code by programs called assemblers.
The third generation of code, was called high level language or HLL, which has human sounding words and syntax (like words in a sentence). In order for the computer to understand any HLL, a compiler translates the high level language into either assembly language or machine code. All programming languages need to be eventually translated into machine code for a computer to use the instructions they contain.