Here ‘of a feather’ means ‘of the same kind or family’, and the verb ‘to flock’ means t’o feed or travel in company’. We do not find rooks flocking with swallows, or partridges flocking with seagulls. In the same way, human beings with similar tastes or interests tend to come together in groups. The proverb is often used about people we disapprove of.
‘They’re a rough crowd. Why does young Robinson have anything to do with them?’
‘Birds of a feather flock together, you know.’