Who Created Allah?
Question

I tell non-Muslims that Allah created everything in this universe. They ask me who created Allah? How can Allah have been there since the beginning? How can I answer them?
Praise be to Allah.Origin of the Question: Who Created Allah?
This question which the non-Muslims have asked you is inherently false and self-contradictory. If we were to say – for the sake of argument – that someone created Allah, then they would ask you, Who created the creator of the Creator? Then, who created the creator of the creator of the creator?! And so on, ad infinitum. This is irrational and impossible.
All of creation goes back to the Creator Who created all things. No one created Him; He created everything other than Himself. This is what makes sense and is logical. This Creator is Allah, may He be glorified and exalted.
With regard to what our religion tells us, the Prophet (peace and blessings of Allah be upon him) told us about this question, where it comes from, and how to respond to it.
Abu Hurayrah (may Allah be pleased with him) said: The Messenger of Allah (peace and blessings of Allah be upon him) said: “People will keep on asking questions until someone will say, ‘Allah created the universe , but who created Allah?’ Whoever encounters anything like that, let him say, ‘Amantu Billah (I believe in Allah).’”
The Messenger of Allah (peace and blessings of Allah be upon him) said: “The Shaytan will come to one of you and say, ‘Who created heaven? Who created the earth?’ He will say, ‘Allah’” – then he mentioned something similar (to the previous report), and added, “And His Messengers.” [i.e., amantu Billah wa Rusulihi = I believe in Allah and His Messengers]
The Messenger of Allah (peace and blessings of Allah be upon him) said: “The Shaytan will come to one of you and say, ‘Who created such and such?’ until he says to him, ‘Who created your Lord ?’ When it reaches that stage, let him seek refuge with Allah [say A’udhu Billahi min ash-shaytan ir-rajim = I seek refuge with Allah from the accursed Shaytan] and stop thinking about it.”
The Messenger of Allah (peace and blessings of Allah be upon him) said: “The Shaytan will come to a person and say, ‘Who created such and such…’” and he narrated the whole report. (Imam Muslim, 134)
How to deal with the question: Who created Allah?
In these ahadith (Prophetic narrations) we see:
Where this question comes from – from the Shaytan;
How to deal with it, which is:

to stop pursuing these thoughts and these tricks of the Shaytan
to say, “I believe in Allah and His Messengers”
to seek refuge with Allah from the Shaytan.

It was also reported that one should spit dryly three times to one’s left, and recite Qul Huwa Allahu ahad. (See "Problems and Solutions")
Prior existence of Allah
With regard to the prior existence of Allah , our Prophet (peace and blessings of Allah be upon him) has told us about this, for example:
He (peace and blessings of Allah be upon him) said: “O Allah, You are the First and there is nothing before You; O Allah, You are the Last and there is nothing after You.” (Narrated by Muslim, 2713)
He (peace and blessings of Allah be upon him) said: “Allah existed when there was nothing apart from Him.” According to another report, “There was nothing before Him.” (Narrated by al-Bukhari; the first report 3020; the second report 6982).
This is in addition to what is stated in the verses of the Quran. The believer believes without doubt, the non-Muslim denies and the hypocrite doubts. We ask Allah to grant us sincere and certain faith with no doubts. And Allah is the Source of strength.
And Allah knows best.