Confucius was primarily a philosopher and educator in ancient China. He dedicated his life to teaching ethical principles, proper conduct, and social harmony through his teachings, which emphasized morality, respect for authority, and the importance of family. He also served in various government roles, including positions that involved administration and governance, although his influence as a thinker and teacher is what he is most renowned for. His ideas laid the foundation for Confucianism, a system of thought that profoundly influenced Chinese culture and society.