Here's a nice, general, global question that is way outside our scope to actually answer! Check it out: Perhaps you can do a post on the deified emperors and to which point they were actually worshiped? Woohoo! Seems like a simple question, but in actuality it totally is not!
I suspect that our anonymous question-asking friend here is probably referring to the deified emperor cults of ancient Rome, which are fairly famous and popular in western culture even now, but in point of fact, there are tons of deified emperor cults, and they aren't all from Rome! The idea of worshiping the emperor as a deity before or after death, or of viewing them as having been born inherently divine, is one that has been around for many millennia in many different cultures. I'm going to hit them in semi-chronological order, although really, chronological order of religion across the world is a crapshoot on the best of days.
The idea of the deified emperor dates all the way back to ancient Egypt, where the pharaoh was considered a god both during and after their lifetime. Egypt's pharaohs were around for a long time, and the pharaonic god-cult changed over time as well as having different features in the Lower and Upper kingdoms, but most commonly, the king was considered to be the earthly incarnation or representative of Horus himself, and due all the same respect as the god. Sometimes he was also considered the son of Ra, the sun god, thus also representing the great power that kept the world animated and supported, and various different goddesses were said to be either his mother or his nurse, including Hathor, Bast, and Mut (depending on who was the most powerful mother goddess figure at a particular time).
This wasn't mere lip service, either; the pharaoh was quite literally a god, and was treated accordingly. No one was allowed to touch the Pharaoh's person without permission, the rules for saying and doing the appropriate things to honor and behave in his presence were complicated and strictly enforced, and the spectacular palaces, statues, and tombs in their honor were nothing less than the people would have done for any other god. Upon dying, the pharaoh was sometimes considered to also become a new facet of Osiris, benevolent god of the dead, or at the very least to be accepted and welcomed by Osiris as an equal. This living deification is one of the reasons that the pharaohs were so renowned as war heroes; when the pharaoh went out in his chariot with the troops, it was literally equivalent to Horus, god of war, personally marching with the army, and it's hard not to find that inspiring.
The Egyptians were doing this for a very, very long time, starting somewhere in the third millennia B.C.E., so everyone else on our quick list seems something like an upstart in comparison. The first of the divine Japanese emperors arrived in around 660 B.C.E.; like the pharaoh, the Japanese emperors are also considered inherently divine, in this case because all of them descend from the great empress of the gods herself, Amaterasu. The first of the Japanese emperors, Jimmu, was her grandson, whom she sent to the world in order to conquer it on behalf of the gods and impose order upon it, and all subsequent Japanese emperors are directly descended from him, making their line an unbroken connection to the divine. Not every Japanese emperor is considered to ascend to heavenly godhood after death, but several of them have - for example, Emperor Ojin became the samurai god Hachiman.
Because the emperor is literally descended from the gods, he is generally considered, like the Egyptian pharaoh, to be the closest connection to the divine that humanity can have access to. Even up into the present day, the emperor is not just a head of state but also the head of the Shinto religion itself, since as divinity in human form he can interpret holy law and oversee religious practices in a way mere secular figureheads could not. He also possesses the Imperial Regalia of Japan, which serve as links to his divine ancestry and proof of his own divinity - the sword Kusanagi that was taken from the body of a dragon by the god Susanoo after he had defeated it, the Yata no Kagami, the mirror in which Amaterasu beheld her beautiful features and ended the long darkness she had allowed to descend on the world, and the Yasakamai no Yagatama, the holy jewel of the gods.
By about 220 B.C.E., China had begun their own imperial dynasties and rushed to join the fun. Chinese emperors, at least early on, tended to do the opposite thing from the Egyptian and Japanese versions; they were seldom divine during their lifetimes, but rather ascend to become deified after their deaths, based on how incredible their deeds were and how large a mark on history they made while they were alive. Such famous figures as Huang Di, the Yellow Emperor, or Guan Yu, the famous warlord, were considered to have become gods upon their deaths, ascending to continue their important work of supporting and ordering the universe on a cosmic level after doing so thoroughly during their mortal lives.
By the time of the Zhou Dynasty, the idea of the Mandate of Heaven arose (largely to help the new dynasty justify overthrowing the old one), which claimed that the gods directly supported the dynasty and its emperor and therefore he ruled by divine right. This eventually led to the idea of the emperor as the Son of Heaven, imbued directly with deific power, which generally resulted in the emperor being considered to ascend to heaven after his death. As in ancient Egypt, the emperor being the literal expression of divine power on earth caused some truly complicated and draconian rules about what could or could not be said to or around him and what kinds of rituals and respect had to be shown to him.
(Fun fact: the Japanese idea of the divine imperial emperor was probably actually based on the Chinese model that they saw when visiting the mainland, but then they attempted to make themselves retroactively the first to do it by setting the time period of Emperor Jimmu previous to the rise of the Qin Dynasty, thus allowing themselves to claim they were the original divine emperors. You see what I mean about trying to do any kind of mythological history strictly chronologically.)
And then finally, we're at Rome, which is probably where you wanted us to start. Rome is comparatively a baby next to these older traditions; the first Roman emperor didn't begin reigning until 46 B.C.E., and, just like the later Chinese emperors, the idea of the emperor as divine was put in place in order to legitimize his power, making it obvious that the gods supported him and that therefore humans had no business trying to challenge his power. Unlike some of the others, the Roman love of voting meant that there was actually a vote for the emperor, after his death, to decide on whether or not he was deified, which meant that unpopular or unsuccessful emperors didn't automatically get to be gods, but emperors everyone loved were easily elevated to godhood.
The cult of the deified emperor, once he had been voted into place, could take a few forms. Sometimes the emperor was directly deified, which was the case with Emperor Augustus, who was thereafter worshiped as Augustus, divine lord; other times, the emperor (and his family members, usually) were identified with existing gods, and said to be or represented as images of existing gods, such as considering the emperor a particular epithet of Jupiter. Some emperors were also able to take on some of the divine power of their predecessors; Augustus, for example, was able to leverage having been so closely associated with or "created by" Julius Caesar that he was considered supported by Julius' divine power after death as well.
Obviously, while this is a quick sampling of the most common and popular divine emperors, it's in no way a complete list. Kings like being revered as gods, generally - it makes it much easier to get things done and people tend to respect you and rebel a lot less often when they think they'll receive a smiting from heaven for it - and therefore the device has been used by a lot of ruling powers throughout history, some more successfully than others. How sincere each imperial cult is depends largely on the emperor in question and the historical and cultural factors at work in the religion at that time, so that some emperors were quite literally and popularly considered divine, while others were only paid the lip service required and seldom actually believed in.