The honourable angels accompany the children of Adam from the day they are formed in their mothers’ wombs until the day when their souls are brought forth from their bodies at the time of death. They also accompany them in their graves and in the Hereafter.
Their accompanying them in this world is as follows:
1 – They take care of him when he is created
It was reported from Anas (may Allah be pleased with him) that the Prophet (peace and blessings of Allah be upon him) said: “Allah appoints an angel in the womb, who says, ‘O Lord, a nutfah (mixed drop of male and female sexual discharges)? O Lord, an ‘alaqah (a clot)? O Lord, a mudghah (lump of chewed flesh)?’ When Allah decrees that it is to be created, (the angel) says, ‘O Lord, male or female? Doomed or blessed? What is his provision? What is his lifespan?’ And that is written in his mother’s womb.” [al-Bukhaari, Muslim].
2 – They guard the son of Adam
Allah says (interpretation of the meaning):
“It is the same (to Him) whether any of you conceals his speech or declares it openly, whether he be hid by night or goes forth freely by day.
For him (each person), there are angels in succession, before and behind him. They guard him by the command of Allah.” [13:10-11]
The commentator on the Quran who had the best understanding of it, Ibn ‘Abbas (may Allah be pleased with him) explained that the mu’aqqibat [translated here as “angels in succession”] refers to the angels whom Allah has appointed to guard man from in front and from behind. When the decree of Allah comes – when He decrees that some accident or calamity etc. should befall him – the angels withdraw from him.
Mujahid said: There is no person who does not have an angel appointed to protect him when he is asleep and when he is awake, from the jinn, men and wild beasts. There is nothing that comes to him but the angels tell it to clear off, except for that which Allah grants permission for it to befall him.
A man said to ‘Ali ibn Abi Talib (may Allah be pleased with him): “A group from (the tribe of) Murad wanted to kill you.” ‘Ali (may Allah be pleased with him) said, “With every man there are two angels who protect him from everything that is not decreed; when the decree comes, they withdraw and do not stand between him and it. A man's decreed lifespan is his protection.”
The “angels in succession” mentioned in the ayah (verse) from Soorat al-R’ad are what is referred to in another ayah (interpretation of the meaning):
“He is the Irresistible (Supreme), over His slaves, and He sends guardians (angels guarding and writing all of one’s good and bad deeds) over you, until when death approaches one of you, Our messengers (angel of death and his assistants) take his soul, and they never neglect their duty.” [6:61]
The guardians whom Allah sends protect a person until the appointed time (of death) that has been decreed for him comes.
3 – The angels who write down hasanat (good deeds) and sayyiat (bad deeds)
Every single person has two angels who write down his deeds, both good and bad, minor and major. Allah says (interpretation of the meaning):
“But verily, over you (are appointed angels in charge of mankind) to watch you,
Kiraman (Honourable) Katibeen —writing down (your deeds),
They know all that you do.” [82:10-12]
“And indeed We have created man, and We know what his own self whispers to him. And We are nearer to him than his jugular vein (by Our Knowledge).
(Remember) that the two receivers (recording angels) receive (each human being), one sitting on the right and one on the left (to note his or her actions).
Not a word does he (or she) utter but there is a watcher by him ready (to record it).” [50:16-18]
The angel on the right records hasanat (good deeds) and the angel on the left records sayyiat (bad deeds).
It was reported from Abu Umamah that the Messenger of Allah (peace and blessings of Allah be upon him) said: “The angel on the left does not write down anything until six hours have passed after a Muslim does a bad deed. If he regrets it and asks Allah for forgiveness, he casts it aside [does not write it down], otherwise he writes down one (sayyiah/bad deed).”
Once we know this, the number of angels who accompany the son of Adam after he is born will become clear: four angels.
Ibn Kathir (may Allah have mercy on him) said:
“The ayah (interpretation of the meaning): ‘For him (each person), there are angels in succession, before and behind him. They guard him by the command of Allah’ [13:10-11] means: each person has angels who take turns in guarding him by night and day, who protect him from evil and from accidents, just as other angels take turns in recording his deeds, good and bad, by night and by day.
Two angels, on the right and the left, record his deeds. The one on the right writes down his hasanat (good deeds) and the one on his left writes down his sayyiat (evil deeds).
Two other angels guard him and protect him, one from behind and one from in front.
So there are four angels by day and four others by night.” [Tafsir Ibn Kathir]
And Allah knows best.
(Source - Islam Q&A)