The pronouns are in the place of a certain case depending on governing elements around them
The attached pronoun صل ِ َّض ِميْر ال ُمت
َّ ال can be in the case of نصب ,رفع and جر. When it is رفع it is the فاعل and is identified as all the other non-hidden inflections of the مضارع, ماضي and أَمر. When it is نصب it is the مفعول به (object). Anytime you see an ضمير متصل i.e هُم، هُما،ُ هafter a verb then you can immediately assume its the مفعول به. Finally, it can be جرin one of two ways: as the مضاف إليه after a noun or as an إسم مجرور after a حرف جر.