Recall three roles in which a noun is marfu.
RoleExampleMarfu nounmubtada or khabarزَيْدٌ صَالِحٌزَيْدٌ، صَالِحٌfa'ilضَرَبَ زَيْدٌزَيْدٌna'ib al-fa'ilضُرِبَ زَيْدٌزَيْدٌ
The same spelling زَيْدٌ can serve different roles; the sentence tells us which role it has.