الَّذِي خَلَقَ السَّمَاوَاتِ وَالاَْرْضَ
Who created the heavens and the earth...
means, He is the Ever-Living Who never dies, He is the Creator, Sustainer and Sovereign of all things, Who by His might and power created the seven heavens with their vast height and width, and the seven earths with their great depths and density.
وَمَا بَيْنَهُمَا
and all that is between them,
فِي سِتَّةِ أَيَّامٍ ثُمَّ اسْتَوَى عَلَى الْعَرْشِ
in six Days. Then He rose over the Throne.
means, He is running all affairs and He decrees according to the truth, and He is the best of those who decide.
ثُمَّ اسْتَوَى عَلَى الْعَرْشِ الرَّحْمَنُ فَاسْأَلْ بِهِ خَبِيرًا
Then He rose over (Istawa) the Throne. The Most Gracious! Ask Him, as He is the All-Knower.
meaning, find out about Him from one who knows most about Him, and follow him and take him as your example. It is known that there is no one who knows more about Allah than His servant and Messenger Muhammad, the absolute leader of the sons of Adam in this world and the Hereafter, who does not speak of his own desire, but conveys revelation revealed to him. What he says is true, and he is the leader whose decision counts; when there is a dispute, people are obliged to refer to him, and whatever is in accordance with his words and deeds is right, and whatever goes against them should be rejected no matter who says or does it.
Allah says;
فَإِن تَنَازَعْتُمْ فِى شَىْءٍ
(And) if you differ in anything among yourselves... (4;59)
وَمَا اخْتَلَفْتُمْ فِيهِ مِن شَىْءٍ فَحُكْمُهُ إِلَى اللَّهِ
And in whatsoever you differ, the decision thereof is with Allah. (42;10)
وَتَمَّتْ كَلِمَةُ رَبِّكَ صِدْقاً وَعَدْلاً
And the Word of your Lord has been fulfilled in truth and in justice. (6;115)
meaning, He has spoken the truth and is fair and just in His commands and prohibitions.
Allah says here;
فَاسْأَلْ بِهِ خَبِيرًا
Ask Him, as He is Al-Knower.
Condemnation of the Idolators
Then Allah rebukes the idolators who prostrate to idols and rivals instead of Allah