把 grammar and when it MUST be used, not when it CAN be used
The short answer is that the &quot;ba&quot; construction is required when a direct object representing a human or an animate item or a non-specific indefinite inanimate item is moved before the verb. Moving such an object before the verb is done for the purposes of topicalisation or adding focus to it.
For example:

He hit the ball.
他球打了
他把球打了

In the above 把 is optional, although having it makes it clearer. The optional nature of the 把 comes from 球; it is inanimate, so does not require 把.

He hit me.
*他我打了
他把我打了

Here, 把 is obligatory when 我 is put before the verb for emphasis. Why? Because it is animate (and because it is a pronoun).
Why you would have to put an object in front? It depends on the verb, and specifically: when certain verbs can take two objects or &quot;arguments&quot;, only the indirect /positional one fits after the verb, and so the direct object must go before the verb in Mandarin. The most well-known one is 放, but others like 送 / 丢
/ 仍 also exist.

He puts the cake on the plate.
*他放蛋糕在盘子上
他把蛋糕放在盘子上

Notably however, this restriction is relaxed in dialectal Mandarin and in other Chinese topolects like Cantonese: it is not obligatory to use 将 (the Cantonese equivalent of 把) for verbs like 放:

He puts the cake on the plate
Cantonese only
佢將蛋糕放喺碟上
佢放蛋糕喺碟上