فَتَلَقَّىٰٓ ءَادَمُ مِن رَّبِّهِۦ كَلِمَـٰتٍ فَتَابَ عَلَيْهِ ۚ إِنَّهُۥ هُوَ ٱلتَّوَّابُ ٱلرَّحِيمُ Qur’an Al-Baqara (2:37)Fatalaqq a a damu min rabbihi kalim a tin fat a ba AAalayhi innahu huwa a l ttaww a bu a l rra h eem u
The prayer that Adam and Eve were inspired to say is mentioned in 7:23, “Our Lord! We have wronged ourselves. If You do not forgive us and have mercy on us, we will certainly be losers.”
As "names" in verse 31 above is used for the "nature of things", so "words" here mean "inspiration" "spiritual knowledge". The Arabic word used for "learn" here implies some effort on his part to which God's Grace responded.