The .pyc files that you are seeing contain byte code, the byte code is the set of codes that results after the compilation of source code by the Python interpreter. This code is then executed by Python's virtual machine.
The definition which tells how Python is Interpreted in Python's documentation is as follows:
Python is an interpreted language, as opposed to a compiled one, though the distinction can be blurry because of the presence of the bytecode compiler. This means that the source files can be run directly without explicitly creating an executable which is then run/executed.
In particular, the .pyc files you are seeing are cached bytecode files produced by CPython.
The CPython compiles the source files into a Python-specific lower-level form (known as "bytecode"), does so automatically when needed (when there is no bytecode file corresponding to a source file, or the bytecode file is older than the source or compiled by a different Python version), usually saves the bytecode files to disk (to avoid recompiling them in the future).
To know more about this you can have a look at the following video tutorial:-