So I believe what this question is getting at is how Satan can be fallen and thrown out of heaven, but also able to communicate with God?
Well to answer it, I want to start with an order of events.
Angels aren't eternal beings, only God is eternal, so angels were created by God, just like the rest of creation. We know this from:
Col 1:16 For by him were all things created, that are in heaven, and that are in earth, visible and invisible, whether they be thrones, or dominions, or principalities, or powers: all things were created by him, and for him:
This verse speaks of different ranks of angels (thrones, or dominions, or principalities, or powers) and calls out that even the invisible things were created by Him.
So when were they created?
Job 38:4 Where wast thou when I laid the foundations of the earth? declare, if thou hast understanding. 5 Who hath laid the measures thereof, if thou knowest? or who hath stretched the line upon it? 6 Whereupon are the foundations thereof fastened? or who laid the corner stone thereof; 7 When the morning stars sang together, and all the sons of God shouted for joy?
So in Job 38 we have the point in time where the foundations of the earth are laid. This is the beginning of the world. In the beginning, God created the heavens and the earth. The angels, or here they are called the "sons of God" were shouting for joy and singing together. So they were all there at creation.
We know that Satan was among them, but that by the time he was tempting Eve in the garden of Eden, he had fallen.
The bible doesn't say how long the gap was between the angels being created, and Satan falling.
So we have an angel, who was lifted up in pride, and fell because of it.
He could no longer be in heaven, but God still permitted him some freedom. He could for example come to earth, and is still permitted to do so.
Until the end of the world, the devil will have some freedom, but then Matthew 25:41 Then shall he say also unto them on the left hand, Depart from me, ye cursed, into everlasting fire, prepared for the devil and his angels:
That eternal punishment is prepared for the devils, and when there are a new heavens and a new earth, they will no longer be able to walk up and down in it.
Lucifer would have been Satan as an angel before he fell, and since he fell he has been referred to as Satan.
When we read the account in Job of the devil presenting himself before God, our minds can go to a physical scene, where God and the devil are in the same place. But we especially know today that you don't have to be in the same place to communicate.
Video calls enable you to communicate with people half way around the world.
When God speaks to us through His word, or hears us when we worship or pray to Him, we aren't standing before Him in heaven, but we are on Earth.
God is infinite, and even in hell, His judgement is there. So we can stand before God, here and now, and he can read our heart, mind and thoughts.
The devil is no different. Wherever he is, God can read his mind and thoughts. He is a spiritual being too, so physical space is even less important.
So the devil had fallen and is under judgement before he tempted Eve in the garden of eden, and is still under that judgement. But in a way, can still communicate with God, despite still being far from Him.
The devil knows he's facing eternal punishment, but he wants to pull as many as he can down with him.
There is nothing that he can do for himself. There is no repentance or forgiveness for the angels spoken of in the word of God.
But there is forgiveness for fallen man.
Even though we have sinned, we have been full of pride, we have rejected God, we can come to God, and repent, and put our faith in Christ, and be forgiven.
There is only one way to overcome the devil. James 4:7 Submit yourselves therefore to God. Resist the devil, and he will flee from you.
You have to resist the devil for him to flee from you, but naturally this is impossible for us.
Even an archangel didn't do this on his own: Jude 9.9 Yet Michael the archangel, when contending with the devil he disputed about the body of Moses, durst not bring against him a railing accusation, but said, The Lord rebuke thee.
If we are to resist the devil, then we need the Lords strength to do so. And to know this strength, we need to know the Lord as our Lord and Saviour.
Until we know the Lord, we simply do as we are tempted, and we love the sin that we do.
But when we turn from our sin, then the Lord gives us strength to fight against sin each day. We're made a new creature, and we know that we will one day go to be with God forever.