The first is relatively simple: The term emperor was used to mark a successful general. His troops hailed him as "imperator". This term was applied to Roman rulers we call emperors, but there were other terms the Romans applied: caesar, princeps, and augustus.
The Romans had been governed by elected kings early in their legendary history. As a result of their abuse of power, the Romans expelled them and replaced them with something like year-kings who served, in pairs, as consuls. The idea of "king" was anathema. Augustus, the grand-nephew and heir of Julius Caesar, is counted as the first emperor. He took pains not to appear to be king (rex), although looking back at his power and accomplishments, it is hard not to view him as such. His successors, appointed by the previous emperor or selected by the military, added more and more powers to their arsenal. By the third century, people were prostrating themselves before the emperor, which is even more severe than simply bowing, as is customary in the presence of modern kings.
The end of the western Roman Empire came when the so-called barbarians asked the eastern Roman Emperor to grant their representative the subordinate title of king (rex). So, the Romans avoided having kings by creating a more powerful autocratic monarch.
For more information, see the following:

