Adam (آدَم, translit. ʾĀdam) is the name used in the opening chapters of the biblical Book of Genesis for the first man created by God, but it is also used in a collective sense as "mankind" and individually as "a human".
The Qur'an mentions two types of prostration: (a) prostration as a form of worship and obedience (whether it be literal, as in during prayer; or figurative), and (b) prostration for reasons other than worship (for instance, in some cultures, it was/is a gesture of respect).
Qur'an 2:34, 17:16, and 20:116 say that Allah ordered Shaytan (Iblis) to prostrate to Adam. It literally says "to Adam", and I see no reason why it shouldn't be taken at face value rather than looking for a sideways interpretation. Obviously, Allah is not commanding Shaytan to worship Adam but rather it is a gesture of humility and an acknowledgment of the potential of the human being to ascend higher than the angels. It may also have been a test for Shaytan to prove his inner nature because, up until then, he had been seen as an excellent worshipper.
(Maybe it was also a gesture of service, in that some of the angels, who were also ordered to prostrate to Adam, are assigned to serve people - for instance, in recording the deeds of people. Some people also hold it was out of reverence for the position of the Prophet Muhammad and his Ahl al-Bayt who would be born from Adam.)
Anyway, all of this appears to have occurred outside the earthly realm. Some also say that "Adam" here refers to humanity as an archetype as a whole, as existing outside this world, and not the living, breathing human being. So, while we picture this as Shaytan getting onto his hands and knees and performing what we consider to be sajda to Adam as a human being, it may have been somewhat different. So for this reason also, it isn't really worthwhile to differentiate between "sajda to" or "sajda in front of".
The Qur'an does not specifically say that sajda is only for Allah. Instead, it says that everything in the heavens and earth already does sadja to Allah, willingly or unwillingly (13:52, etc.). This can be taken to mean literal sajda as well as metaphorical. That is, all created beings are compelled to follow the divine decree and no created being can decide it is outside of Allah's control. Most creations willingly worship Allah, although human beings have the free will to worship Allah or other things (and we have the free will to perform sajda to Allah or not perform sajda to Allah). For this reason, the Qur'an tells people not to do sadja to the sun and the moon, and instead tells people to do sajda to Allah who is the creator of the sun and the moon.
However, according to Islamic law, it is not permissible for human beings to do sadja to other Allah. This is derived from Qur'an and hadith.
The meanings of Quranic verses must be taken from the Prophet himself as Allah (SWT) said in Quran وأنزلنا إليك الذكر لتبين للناس ما نزل إليهم
( We revealed on you the Thikr ( full knowledge of Quran) So that you explain to the people what was revealed for them). Al-Nahl, 44)
Verses which seem to suggest that any Prophet was fallible, are been misunderstood. Verses regarding Prophet Adam (AS) are been explained by the Prophet Muhammad (SAWA) and his Holy Progeny confirming that Adam did not commit any sin whatsoever.
Ahlul Bayt (AS) had many debates in this subject including a very well known debate between Imam Al-Redha (AS) and Al-Ma’moon al-Abbasi, the ruler of that time, in which al-Ma’moon put to the Imam ( AS) the Quranic verses which were according his understanding, showing fallibility of some prophets, and Imam Al-Redha (AS) explained the real meaning which confirms infallibility of all the Prophets.
You may see Tanzeeh al- Anbiyaa’ by al-Shaikh al- Mofeed. تنزيه الأنبياء للشيخ النفيد.
The claim of fallibility of any Prophet goes against Quran where Allah orders people to absolutely obey the prophets. Allah will never order people to obey a sinner.
Based on the common tradition narrated from Imam Muhammad al-Baqir (a.s.), when asked about the meaning of Surah Qaaf, verse, 15, he (a.s.) replied that there were Adams before and there will be Adams after. However, we do not have any further information beyond this. Nothing has been said in description of them.
The Almighty says in the Holy Quran:
وَيَخْلُقُ مَا لَا تَعْلَمُونَ
"And He creates what you do not know." (Surah al-Nahl, verse 8).
And Allah knows best.
Thank you for your question. The answer is not known, however among the theories brought forward by our scholars is that Allah sent down houries (women from paradise) who they married.
May you always be successful