Confucius was born about 2,500 years ago. In those times, the only people who could get an education were the nobles and the government officials. Public school did not yet exist in ancient China. There was no public library. There was no internet of course. So, how could a young man learn?
Confucius decided the only way was to go to work for a nobleman. Every time the noble traveled, Confucius went with him, including trips to the imperial court and the capital city. He studied and learned until he probably was the most highly educated man of his time.
With the nobleman's help, Confucius became a teacher. Confucius was willing to teach anyone who wanted to learn. He was the first private teacher in China.
He had very strict ideas of how people should behave to develop moral character. These ideas are called Confucianism. Confucianism is not a religion; it's a way of behaving, so you'll do the right things.
Excerpt from The Analects of Confucius, c.400 BCE
Do not do unto others, what you would not want others to do to you
If you make a mistake and do not correct it, this is called a mistake
Everything in life had to be done a certain way. One of his rules was that gentlemen could only display their skill as archers on three hunts a year, in the spring, autumn, and winter. This was not a popular rule with some of the nobles. But Confucius continued to teach his strict rules of behavior. Many people, including many nobles, followed the rules of Confucius.