I have 4 chicks out with their mama hen and she will challenge any rooster lol so nobody messes with her but when it gets dark she knows to go to her house and I lock her up.
I let my chicks out at 3 weeks with the hen. The other hens will probably peck the chick once or twice and the chick will know to run to its mom. You can tell male chicks gender around 6-8 weeks.