From Halopedia, the Halo wiki
Flood Friends, also referred to as Flood Buddies or Pet Flood, is a phenomenon found in the Campaigns of the Halo Trilogy. It is a design flaw that allows Flood combat forms to be made into harmless "pets" that follow the player around. Such "pets" can also be used as shields and distractions.
Halo: Combat Evolved and Anniversary
Play a Campaign level in Halo: Combat Evolved or Anniversary that contains Flood forces. You can use the assault rifle and pistol for the glitch, but the plasma pistol and plasma rifle are more recommended.
When you spot a Flood combat form, shoot off its tentacled arm. If the combat form is carrying a weapon, shoot off its right arm as well. When dealing with unarmed combat forms, only the left arm must be amputated.
At this point, the combat form will have been rendered harmless, and will simply follow the player around.
The number of Flood Buddies you can make is technically indefinite, but on a slow computer, the game will begin to slow after 6-7 Flood Buddies are acquired, and will lag severely when more than 12 are present. Flood Buddies are very hard to get rid of, because they run very fast around you. Strangely enough, the "friendly" Flood do not show up on your Motion tracker.
In Halo 2, the game designers changed the Flood's programming. When you shoot both arms off an Elite combat form, its Pod infector will abandon the body. Human Combat Forms will simply disintegrate and take the Pod infector with it when both arms are shot off. However, it is still possible to make a Flood Buddy: if the Flood combat form isn't carrying a weapon, you can shoot off just the left arm, and it will be harmless since it has no weapon. Though they may push you around a bit by attacking you with their right arm, they are not able to damage you in any way.
Also, if you shoot off both arms of a dead combat form as it is being revived by a Pod infector, it will get up for a brief moment and then get abandoned by the Pod infector.
In Halo 3, it is possible to make a Flood Buddy in the same way as in Halo 2 - by shooting off the tentacled appendage of any combat form that is not carrying a weapon. In order to shoot the Elite combat form's arm off, its shield must be down.
The combat form will charge at you, but cannot harm you unless it pushes you off a ledge. If you are facing away, they will also attempt to assassinate you with an invisible tentacled arm, though this will only take down a quarter of your shields. Also, if your Flood Buddies attempt to follow you after their designated checkpoint, the Pod infectors will detach themselves from the combat forms (not destroying the form but merely turning it into a rag doll) and run in random directions, and popping shortly.
Another way is to kill a combat form without destroying the body, and then shoot off the left arm. You must leave any weapon near it that it cannot use due to not having an animation for it, such as a Gravity Hammer. Leaving a weapon near a body will seem to attract an Pod infector to the body, as it would have a means of hurting the player. Once the body is alive again, it will follow you around like a normal Flood Friend, but it cannot hurt you as it doesn't have an animation to attack with the Gravity Hammer.