Confucianism is an ancient philosophy that is older than Confucius, but he was the one that spread it throughout China, teaching and discussing these ideas. His students were the ones that wrote his ideas in a book that is called Analects of Confucius.
Buddhism has a similar history, Buddha traveled and taught his ideas to all that were open to listening to it. His students also were open to become missionaries and spread the religion to other countries.
The difference is that Buddhism is a religion and Confucianism is a philosophy of life that permeated the government and the Chine culture. Confucianism teaches rite, justice, honesty, shame, humanity, love, loyalty and filial piety. They are basic daily conduct rules that all Chinese have as a national culture.
Buddhism also has a big influence, but being a religion, people can believe in it or not.