Expanding on Kalle's response a bit.
Firstly, we have to assume you are talking about a regular scrimmage down. Based on that understanding, if there are no other reasons that affect the play clock, such as an administrative stoppage (completion of a penalty, measurement, etc.), the key is: Will Team A or Team B actually next put the ball in play by snap? If the answer is Team A, then the play clock is 40 seconds and 'automatic' (i.e., started automatically by the PCO when the ball becomes dead after the previous down). If the answer is Team B, then the play clock is 25 seconds, and starts on the referee's signal.
Examples:
A advances beyond the LTG and the ball becomes dead: 40 (automatic). This is an award of a first down to Team A.
B intercepts/recovers A's fumble or legal pass, then A regains possession by catching/recovering B's fumble or backward pass and the ball becomes dead: 40 (automatic) This is called "A-B-A," and is an award of a first down to Team A.
B catches/recovers A's fumble or pass, and the ball becomes dead: 25, and starts on the referee's signal. This is an award of a first down to Team B.
There are lots of other situations, of course, but you only asked about COPs during (non-kicking) scrimmage downs.