You need to know a little about Egyptian history and the history of the Roman Empire.
As the Roman Empire expanded throughout the world, Egypt became one of the many countries taken over by Rome. Augustus established Roman rule in Egypt in 30 B.C. Egypt was an extremely rich country, very fertile, so many nations wanted to conquer her. Because of the Nile River Valley, Egypt was the major supplier of grain for Rome.
Cleopatra was queen of Egypt before it was taken over by Rome. The historian Plutarch wrote a lot about her, from which Shakespeare got his information. Her character in the play is different from the real Cleopatra, who was well-educated and wise, not the emotional and flighty drama queen you see in the play. Cleopatra was from the Ptolemaic dynasty (her father was named Ptolemy, as well as her brothers). She ruled Egypt with her two brothers at first – she even married one of them – but she was able to wrest sole power from them eventually. In order to keep this power, she formed an alliance with Julius Caesar to strengthen her claim to the throne of Egypt. After Caesar was assassinated in 44 BC, she formed an alliance with Mark Antony against Octavian (Augustus) Caesar, Julius Caesar’s heir. There actually was an historical battle between Egypt and Rome. Egypt was defeated, as in the play, and became part of the Roman Empire. Mark Antony really did commit suicide after losing the battle, as did Cleopatra later, same as in the play. Although Mark Antony was a Roman, he fought against Rome (Octavian/Augustus), aligned with his lover, Cleopatra.
Read about the play here on eNotes.