Let me start off with Machiavelli's words:
"Because how one ought to live is so far removed from how one lives that he who lets go of what is done for that which one ought to do sooner learns ruin than his own preservation: because a man who might want to make a show of goodness in all things necessarily comes to ruin among so many who are not good. Because of this it is necessary for a prince, wanting to maintain himself, to learn how to be able to be not good and to use this and not use it according to necessity."
Machiavelli's basic point is do whatever you need to do to retain and gain power without too much thought toward morality. To put it another way, it would be wise to be good in a world where all men are good, but since this is not the case, you must do whatever you need to do to get ahead and maintain power.
For example, he says that conquering other lands with an army is fine. In fact, it is the best way to gain new lands. Also if he needs to destroy people, he should do it thoroughly, so that there will not be people to seek vengeance.
At this point one may note that men must be either pampered or annihilated. They avenge light offenses; they cannot avenge severe ones; hence, the harm one does to a man must be such as to obviate any fear of revenge.
Finally, Machiavelli argues that it is better to be feared than loved based on his understanding of human nature. In the end, knowing the world and acting accordingly will make a person successful.