In Egyptian mythology, Apis or Hapis (alternatively spelled Hapi-ankh), was a bull-deity worshipped in the Memphis region.

According to Manetho, his worship was instituted by Kaiechos of the Second Dynasty. Hape (Apis) is named on very early monuments, but little is known of the divine animal before the New Kingdom. Ceremonial burials of bulls indicate that ritual sacrifice was part of the worship of the early cow deities and a bull might represent a king who became a deity after death. He was entitled "the renewal of the life" of the Memphite god Ptah: but after death he became Osorapis, i.e. the Osiris Apis, just as dead humans were assimilated to Osiris, the king of the underworld. This Osorapis was identified with the Hellenistic Serapis, and may well be identical with him. Greek writers make the Apis an incarnation of Osiris, ignoring the connection with Ptah.

Apis was the most important of all the sacred animals in Egypt, and, as with the others, its importance increased as time went on. Greek and Roman authors have much to say about Apis, the marks by which the black bull-calf was recognized, the manner of his conception by a ray from heaven, his house at Memphis with court for disporting himself, the mode of prognostication from his actions, the mourning at his death, his costly burial, and the rejoicings throughout the country when a new Apis was found. Mariette's excavation of the Serapeum at Memphis revealed the tombs of over sixty animals, ranging from the time of Amenophis III to that of Ptolemy Alexander...

(...)

The cult of the Apis bull started at the very beginning of Egyptian history, probably as a fertility god connected to grain and the herds. In a funerary context, the Apis was a protector of the deceased, and linked to the pharaoh. This animal was chosen because it symbolized the king’s courageous heart, great strength, virility, and fighting spirit. The Apis bull was considered to be a manifestation of the pharaoh, as bulls were symbols of strength and fertility, qualities which are closely linked with kingship ("strong bull of his mother Hathor" was a common title for gods and pharaohs).

Occasionally, the Apis bull was pictured with her sun-disk between his horns, being one of few deities associated with her symbol. When the disk was depicted on his head with his horns below and the triangle on his forehead, an ankh was suggested. It also is a symbol closely associated with his mother. The Apis bull is unique as he is the only Egyptian deity represented solely as an animal, and never as a human with an animal's head—perhaps, because from the earliest of Egyptian religious practices, they were animals sacrificed to the cow goddess and represented the resurrected, renewal of life (Hapy and later Osiris).

Apis was originally the Herald (wHm) of Ptah, the chief god in the area around Memphis. As a manifestation of Ptah, Apis also was considered to be a symbol of the pharaoh, embodying the qualities of kingship.

The bovines in the region in which Ptah was worshipped exhibited white patterning on their mainly black bodies, and so a belief grew up that the Apis bull had to have a certain set of markings suitable to its role. It was required to have a white triangle upon its forehead, a white vulture wing outline on its back, a scarab mark under its tongue, a white crescent moon shape on its right flank, and double hairs on its tail.

The bull which matched these markings was selected from the herd, brought to a temple, given a harem of cows, and worshipped as an aspect of Ptah. His mother was believed to have been conceived by a flash of lightning from the heavens, or from moonbeams, and also was treated specially. At the temple, Apis was used as an oracle, his movements being interpreted as prophecies. His breath was believed to cure disease, and his presence to bless those around with virility. He was given a window in the temple through which he could be seen, and on certain holidays was led through the streets of the city, bedecked with jewelry and flowers.

(...)

When Osiris absorbed the identity of Ptah, becoming Ptah-Seker-Osiris, the Apis bull became considered an aspect of Osiris rather than Ptah. Since Osiris was lord of the dead, the Apis then became known as the living deceased one. As he now represented Osiris, when the Apis bull reached the age of twenty-eight, the age when Osiris was said to have been killed by Set, symbolic of the lunar month, and the new moon, the bull was put to death with a great sacrificial ceremony.

There is evidence that parts of the body of the Apis bull were eaten by the pharaoh and the priests to absorb the Apis's great strength. Sometimes the body of the bull was mummified and fixed in a standing position on a foundation made of wooden planks. Bulls' horns embellish some of the tombs of ancient pharaohs, and the Apis bull was often depicted on private coffins as a powerful protector. As a form of Osiris, lord of the dead, it was believed that to be under the protection of the Apis bull would give the person control over the four winds in the afterlife.

By the New Kingdom, the remains of the Apis bulls were interred at the cemetery of Saqqara. The earliest known burial in Saqqara was performed in the reign of Amenhotep III by his son Thutmosis; afterwards, seven more bulls were buried nearby. Ramesses II initiated Apis burials in what is now known as the Serapeum, an underground complex of burial chambers at Saqqara for the sacred bulls, a site used through the rest of Egyptian history into the reign of Cleopatra VII.

The Apis was a god to be venerated for his excellent kindness and for his mercy towards all strangers. Apis was the most popular of the three great bull cults of ancient Egypt (the others being the bulls Mnewer and Bakha.) Unlike the cults of most of the other Egyptian deities, the worship of the Apis bull was continued by the Greeks and after them by the Romans, and lasted until almost 400 A.D.

For more, see: Wiki (mentions Apis in relation to Serapis, etc)
The Apis was considered to be a manifestation of the Memphite creation god Ptah; it was the 'soul (Ba) Ptah' and 'herald (whm) of Ptah'. The bull was therefore a kind of servant, who was himself divine. Sometimes, it was shown to the populace; during this procession, its walk was considered to be the blessing of the country.

When the Apis died, it was buried in a necropolis at Saqqara, which was first used by Nebmaatra Amenhotep III (1391-1353). The died bull had become identical to the god of the Underworld, Osiris. Therefore, he was known as Osiris-Apis. During the reign of the Ptolemaic kings (323-30 BCE), the god Osirapis or Serapis became the most important god of Egypt.

The Apis is usually depicted as a black bull with, between his horns, a sun disk and an uraeus snake. An example can be found on the tomb of the Apis that died in September 524, which shows the Cambyses, the Persian king who had conquered Egypt but behaved like a normal pharaoh, venerating the bull.

The Greeks identified the Apis with their demi-god Epaphus, a son of their supreme god Zeus and his lover Io, who had been transformed into a cow. The cult for Apis still existed in Roman times; the sacred animal was even protected by an official bodyguard, a lictor. However, the worship disappeared when Egypt was christianized, atlhough a very brief revival during the reign of the emperor Julianus Apostata (361-363) is likely.

From: here
After an Apis bull's death he merged with Osiris as Osiris-Apis (Greek Serapis). His carcass was mummified and buried in a sarcophagus, the gAwy.t, in the Serapeum. The Serapeum Stela of Ahmose II records the life and death of an Apis bull:
Year 23, first month of the third season (ninth month), day 15, under the majesty of the King of Upper and Lower Egypt, Khnemibre (Amasis), given life forever.
The god was conducted in peace to the Beautiful West, to let him assume his place in the necropolis, in the place which his majesty made for him, the like of which never was made before; after there had been done for him all that is done in the pure house (i.e. the place of embalmment).
Low, his majesty had in remembrance how Horus did for his father, Osiris, and he made a great sarcophagus of granite. behold, his majesty found it good to make it of costly stone /// all kings of all times. He made a shroud of mysterious linen of Resenet and Mehenet, to attach to him his amulets, and all his ornaments of gold and every splendid, costly stone. They were more beautiful than what was done before, for his majesty loved Apis, the Living Son, more than any (other) king.
The majesty of this god went forth to heaven in the year 23, third month of the second season (seventh month), day 6. He was born in the year 5, first month of the first season, day 7. He was installed in the house of Ptah in the second month of the third season (tenth month), day 18. The beautiful lifetime of this god was 18 years, 1 month, 6 days.
Ahmose (II)-Sineit, given satisfying life forever, made (it) for him.
The Serapeum Stela of Ahmose II [4]


From: here
Also see:
Serapis (Wiki)
Article detailing the history and meaning of the Apis Bull
Article: Egypt: Divine Cults of the Sacred Bulls
Religion in Ancient Egypt: Bull Cults
Short summary
Short outline
Neos Alexandria's profile: Epaphos (Apis) (work in progress) & Serapis
House of Netjer profile
Serapis article
Another Serapis article