The Stranger is a philosophical novel. Philosophical fiction is classified less by certain genre conventions (such as love triangles in romance fiction, red herrings in detective stories, and so on) than by a focus on the human condition, morality, or society. Topics such as free will, good and evil, the moral order of the universe, and social morality are common topics for philosophical novels. Such fiction can merge with other genres as well (for example, Brave New World and A Clockwork Orange are both philosophical science fiction novels, while Candide is a philosophical satire), but The Stranger is a more straightforward example.
The Stranger takes an absurdist look at reality, arguing that it has no inherent meaning or order. Nothing in life, whether it be events or individual human behavior, makes rational sense because of this. The protagonist, Meursault, is a representation of this absurdist philosophy, as he is living in the moment, reveling in physical pleasures such as sex and smoking, and finding no need to graft outside meaning onto his behavior or his life. Everything just is for him. His view comes to its fullest expression when he shoots the Arab man on the beach. He has no rational explanation, such as personal animosity or self defense, for why he does so; the closest he can come to one is that the sun was in his eyes.
Meursault's absurdist perspective puts him in conflict with his larger society, which demands that people accept some sort of meaningful approach to life, whether through the moral order of religion or the law. However, Meursault does not do this. His disbelief makes him a threat to those who want life to have inherent meaning (such as the devout Christian magistrate who is appalled that Meursault does not believe in God). Ultimately, Meursault is condemned both for committing murder and for not conforming to society's unspoken demand that life make sense. This is at heart a conflict of philosophies, making The Stranger one of the most influential philosophical novels of the twentieth century.