In simple terms, the Coprocessor is a module in TiKV that reads data and performs computations. This concept is inspired by HBase, and its implementation in TiDB is similar to the Endpoint part of the Coprocessor in HBase. It can also be compared to MySQL stored procedures.
You can check out this source code series article: TiKV 源码解析系列文章(十四)Coprocessor 概览 | PingCAP