Then, when they had both submitted themselves, and he had laid him prostrate on his forehead;
means, when both of them had pronounced the Shahadah and remembered Allah -- Ibrahim because he was about to offer a sacrifice and Ismail because he was about to die.
Or it was said that "submitted themselves" means that they submitted and followed the command of Allah; Ibrahim obeyed the command of Allah and Ismail obeyed Allah and his father.
This was the view of Mujahid, Ikrimah, Qatadah, As-Suddi and Ibn Ishaq, and others.
The meaning of the phrase "and he had laid him prostrate on his forehead" is;
he placed him facedown so that he could slaughter him from behind, and not have to see his face at the time of slaughter, so that it would be easier for him.
Ibn Abbas, may Allah be pleased with him, Mujahid, Sa`id bin Jubayr, Ad-Dahhak and Qatadah said;
وَتَلَّهُ لِلْجَبِينِ
(and he had laid him prostrate on his forehead); means,
"He turned him upside down on his face."
Imam Ahmad recorded that Ibn Abbas, may Allah be pleased with him, said,
"When the rituals were enjoined upon Ibrahim, peace be upon him, the Shaytan appeared to him at the Mas`a and raced with him, but Ibrahim got there first. Then Jibril, upon him be peace, took him to Jamrat Al-`Aqabah and the Shaytan appeared to him, so he stoned him with seven pebbles until he disappeared. Then he appeared him at Al-Jamrah Al-Wusta and he stoned him with seven pebbles. Then he laid him prostrate on his face. Ismail, peace be upon him, was wearing a white shirt, and he said, `O my father, I do not have any garment in which I can be shrouded apart from this; take it off me so that you can shroud me in it.' He started to take it off, then he was called from behind;
وَنَادَيْنَاهُ أَنْ يَا إِبْرَاهِيمُ