Magic in Ancient Egypt was much like magic in other ancient cultures. The Ancient Egyptians used it to communicate with and to bargain with various Gods. They wanted the help of Divine Powers in their lives and later the Afterlife.
The most well-known use of Egyptian magic was the “The Book of the Dead” (“Spells for Going Forth by Day”). These spells helped the Dead traverse the Underworld to arrive at the Afterlife. Many offering formulas were written on the walls of tombs. Usually this formula read “an offering which the Pharaoh gives” to various Gods for a desired end for named persons. (Everything belonged to the Pharaoh, and only he could offer to the Gods. Therefore everyone used the same formula to ask favors for themselves.)
Egyptian magic was largely word based. Writing was itself could be considered an act of magic. Since writing came from the Gods, the hieroglyphs were sacred. Hence, therefore written words could achieve magic.
Roman magic has some things in common with Egyptian magic. In their rituals, Romans use rigid formulas. If a mistake is made, the ritual is started over because the Gods would be displeased with the mangling of words. A proper ritual is how Romans return the help provided to them by the Gods.
Romans used word squares or magic squares in their door foyers. These squares had letters and numbers in puzzle form for the outside Manes to figure out. This stalled the Manes from entering. While that was going on, the House Lars would assemble to defend the house.
Another similarity to Egyptian magic was the Roman devotiones (defixiones). These lead tablets were written on and placed in tombs or nailed to trees. These particular tablets asked various Gods for restitution, justice, victory, or love. Many had a reward for fulfilling the request such as an offering. Modern day practitioners of the Religio Romana use paper and bury it in the ground. The usual Gods petitioned are Dis Pater and other Chthonic Gods.
One difference between Roman and Egyptian magic was that the Egyptians often used theirs to aid the Dead. Meanwhile, Romans focused on the living, and keeping ghosts at bay. The Romans wanted to keep the Dead happy, and to honor their Ancestors. However, the Egyptians focused on the Dead and their eternal Afterlife.