Do not prostrate to the sun or the moon

Allah swt said, {And of His signs are the night and day and the sun and moon. Do not prostrate to the sun or to the moon, but prostrate to Allah, who created them, if it is Him that you worship.} ¹
What are the sun and the moon? And what is the prostration to them that is forbidden? And has anyone prostrated to them and because of that it became forbidden?