Product managers are not required to know how to code.
What’s required of them is that they have a competent understanding of software and technology so that they can have technical discussions with their team.
When developers use terms such as API, database, backend, regression testing, a product manager is not clueless nor do they have to continuously ask “what does that mean?”.
Product managers can perform their jobs well with a general understanding of software and technology.
However there are cases where product managers need to have a deeper understanding of this field to define specific products and navigate more deeper technical discussions with their team.
This role is fulfilled by Technical Product Managers (TPM). As the title defines, they are more “technical”.
Technical product managers may have a degree or certification in computer science, have prior experience as a skilled software engineer, or both.
Because of this they are able to have deeper discussions with their development team to define their more technical products and navigate deeper discussions surrounding the underlying technology of their product.
If needed they may even be able to jump into the codebase and code alongside their team. However this does not happen often.
Technical product managers are needed in cases where a product manager works more closely with their development team than the other departments in their company due to the makeup of their product.
Technical product managers are still product managers. So even if they can code, they will not (and should not) be spending much time writing code with their team.
They must continue to fulfill the other responsibilities of their role, though the majority of their time will be focused on technical aspects of their product and interfacing with their development team.