Barmaley has basically explained it. The title of император was introduced by Peter the Great to replace царь, as a grander title and probably also because it is more obviously Latin/Western in origin.
The way the titles worked was that император had a higher standing than царь, as the full title of the Russian emperors declared them to be цаpи of a lot of places.
The full title of the Russian emperors starts with 'Божію Поспѣшествующею Милостію Мы, Николай Вторый Императоръ и Самодержецъ Всероссiйскiй Московский, Кіевскій, Владимірскій, Новгородскій,' (using pre-reform spelling)
and then proceeds to list:
Царь Казанскій, Царь Астраханскій, Царь Польскій, Царь Сибирскій, Царь Херсониса Таврическаго, Царь Грузинскій ...and onwards.
This usage of Царь is similar to how Carolus/King was used in other parts of Europe, as an extremely powerful title but still subordinate to Imperator/Emperor.
In actual practice though, Царь and Император were used interchangeably, but that kind of usage wasn't really correct.
Edit: I'll also add that Царь was used as a title for various figures in the Old Church Slavic Bible. The political usage stems from the Byzantine Empire though. The Slavs referred to the emperor in Constantinople as Царь and even called the city Цариград (the Bulgarian and Serbian usage which continues to this day, although only occassionally). When the Grand Dukes of Moscow married into the Palaeologus family, they started to adopt the title for themselves. Not officially until Ivan IV though.