No, the devil hasn't always existed; he had a beginning, and some day his work will come to an end. Only God is eternal.
Where did the devil come from? The Bible doesn't answer all our questions about the devil - but it does indicate that before the worlds began God created a host of mighty angels who were to serve Him. Satan was one of them - but pride and greed consumed him, and he led a rebellion against God, hoping to overthrow God and take His place as ruler of the universe. The prophet Isaiah recalls this event: "You said in your heart, 'I will ascend to heaven.... I will make myself like the Most High'" (Isaiah 14:13-14).
His rebellion failed - but Satan continues to oppose God and lead people astray. And he will continue to do so until the end of time, when he will be bound forever and ever (see Revelation 20:10). Don't be deceived by his temptations, no matter how attractive they seem!
Never doubt that the devil is real, or that he is powerful. But he also is a defeated foe, because by His death and resurrection Jesus Christ overcame the powers of sin and death and hell. Make sure of your commitment to Christ, for when we give our lives to Him, God frees us from Satan's grip and makes us part of His family forever. The Bible's words are true: "The reason the Son of God appeared was to destroy the devil's work" (1 John 3:8).