Let's first be clear that we didn't evolve from monkeys/apes/etc. That's a common misconception. Evolution states that we and monkeys/apes/etc. evolved from a common ancestor. Same with fish. If you go back far enough, we and fish share a common ancestor... we did not, however, evolve from today's Salmon or Macaque.
That being said, the origin of intelligence is an elusive topic. Intelligence isn't the most tangible concept to study in an evolutionary context as the associated molecular evidence is highly circumstantial. For example, it's difficult to interpret what behavioral differences emerged from the differences in receptor distribution and types associated with our genetic fission from the common ancestor.
Now that we've said that, there's several theories; many of them stem from language. It is thought that the articulation allowed by language allows us to more carefully think about things... but there's always the possibility that the reasoning came first and facilitated the language.
One of the more interesting theories I've read is the bicameral mind. Of course, note the criticisms against it:
"It is one of those books that is either complete rubbish or a work of consummate genius, nothing in between! Probably the former, but I'm hedging my bets."
-Richard Dawkins
Others argue that human consciousness is a social construct.