He sees you as a thread to his hens, a threat top his dominance of the flock, or he considers you one of his hens and wants to dominate you. Probably the second one.
What can you do? The only reason you NEED a rooster is if you want fertile eggs. Anything else is just personal preference.
There are too many good roosters out there to put up with a bad one. If you have kids, he is a threat to them.
You can try to dominate him. You are a lot bigger than he is. Pick him up and carry him around. While holding his belly on the ground peck at his head with your fingers and pull the feathers at the back of his head. If he threatens you, walk toward him and make him back down. If necessary, introduce him to the top of your foot, not hard enough to break bones but hard enough to send him flying backwards a few feet. Don’t let him behind you. He’ll love to pull a sneak attack. If you are consistent doing this for a while, you can maybe teach him that you are the flock master and the dominant one. He’ll probably test your occasionally but as long as you are consistent, you can probably get him back under control.
Now have everyone he might come in contact with do the same thing with him. You’ve taught him to not attack you but you have not taught him to not attack them.
Or keep him penned up where he can never get to you or anyone else if you really do want to keep him.