Chris covered the medications and mechanisms of actions very well. My take is more on management end.
If relatively larger number of birds on small area and bio-security not complete (rarely is), then medicated feed as needed and no more. Over time the development of immune parasites is probable with process being faster with improper use of medicated feeds.
If relatively low number of birds on small area which appears to not be realized much anymore, then medicated feeds need not be used if area not used for poultry in last few years or birds have developed immunity through selection as a landrace. This used to be a reality for my breeding but no longer since moving flocks to region where they are not adapted to local cocci. Landrace development underway but will have some seriously reduced production and increased risk until proper genetics in place.
Using the all in / all out method for production with all rearing equipment between batches of birds can reduce need for medicated feeds as well but you gotta be on your toes to stop outbreaks with medication as needed. It is difficult to stop all introductions of your disease organisms.