In general, these two men differed both in the goals for which they struggled and the ways in which they tried to achieve those goals.
Martin Luther King, Jr. was an integrationist. He believed that blacks and whites should live together in a single, integrated society. He welcomed white people in the movement that he led. Malcolm X, by contrast, was a black nationalist, particularly before he visited Mecca late in his life. He adhered to the Nation of Islam teaching that white people were inferior to black people. He believed that African Americans should stand up on their own instead of looking to whites for support.
King was famously committed to the idea of non-violent civil disobedience. He believed that it was necessary to pursue black rights through non-violent means because that was more ethical than violence and confrontation. Malcolm X did not agree with this. He believed that change must be pursued “by any means necessary.”
Thus, these two leaders were very different in terms of the goals they pursued and the tactics they wished to use in pursuit of those goals.