Philosophy is a thoughtful examination of reality (by chiefly speculative rather than observational means), especially problems involving ideals, truth, reason and discourse accompanied by an attempt to put first things first and expose illusion.
Philosophy stands close to religion, since both are deeply concerned with the order of the world as a whole; but differ in their approach. Philosophy appeals exclusively to reason, while religion appeals also to mystic experience, revelation, and faith.
The emphasis on reason makes philosophy a closer kin to science.
Literally, the word philosophy means "love of knowledge".