In his most famous piece of work, The Prince, Niccolò Machiavelli basically wrote a manual on the types of existing principalities, poiniting out the difference between each of them, on the foundations of power and, finally, on the norms of conduct that the one who aspires to be prince must adopt.
According to the author, it was not enough to achieve power; the prince should be able to keep it, and to do so, he would have to be respected by the people, acting accordingly to each circumstance, changing strategies as appropriate. The most famous saying that synthesizes the Machiavellian though is "The ends justify the means", which means that in order to remain in the custody of power (which would be the "end"), the prince is authorized to act in the most convenient manner, not necessarily needing to stick to rigid moral principles and ethical norms.