There are plenty of instructions on-line. Basically, you need some vinegar/rotting fruit and water in a container, and some means of keeping the flies from getting out once they are attracted. You can use jars with small holes in the lid, or bottles with a narrow neck, or inverted cool drink bottle tops (cut the bottle in two, turn the lid part upside down onto the other bit), you can use soapy water (you need to keep squirting water on to keep the foam up). You can also buy yellow coloured sticky fruit fly traps, although I haven't found those that effective with vinegar flies. You could also try some old-fashioned fly paper traps (but hang them well away from your girls).
If you haven't any rotting vegetation, they might not be vinegar flies.
Not sure they need to be got rid of to the extent a pest control service would be employed.
Insects are everywhere, most are of no threat to chickens.
Positively identifying the insect is the first task, then you can learn if they are a threat to the birds and how you might get rid of them.
I'm guessing they are gnats....they look much like fruit flies..or black flies.
Both can bother chickens a great deal...whether or not they are, you will have to ascertain. A fan can keep them from settling, best solution I've seen.
Some folks swear by hanging vanilla scented paper air fresheners.