He’s a rooster and likes to be the caretaker and boss over his flock. And maybe is showing off to his hens. You could be an intruder in his thoughts. Some aggressive roosters even think the caretaker is the enemy who needs to be suppressed.
Do handle him asap if there is no reason for this behaviour. Teach him you are the boss. Pick him up and hold him to the ground for at least 30 seconds. Do this every day for a week or so. If he still attacks you after this training I wouldn't keep him if for offspring.
Do be carefull with children.
You can find more information in the learning centre.