One of my (in)famous statements as a cultural Christian was, "I'm not a big Satanist." But the Bible clearly teaches their is an angel named Satan.
The Hebrew word is "Satan" or "Shaitan". It can mean any adversary or opponent, but also is used in the context of "The Adversary". The Greek uses a word clearly derived from it, "Satanes".
It often has a legal sense, portraying Satan as a sort of prosecuting attorney in God's court.
The word is used eighteen times in the Old Testament. Fourteen of these are in Job. But a lot of insight can be gained from comparing 1 Chronicles 21:1 "And Satan stood up against Israel, and provoked David to number Israel" and 2 Samuel 24:1 "And again the anger of the LORD was kindled against Israel, and he moved David against them to say, Go, number Israel and Judah".
Skeptics use this as an example of a contradiction in the Bible. Which was it? God or Satan? Now if you assume that Satan is an independent agent (out of God's control, perhaps even rivaling in power), this is quite confusing.
But this shows that God is control of everything, even Satan. God was moved against David, and He allowed Satan to influence him.
So is Satan just following orders? No. Satan has a will which is contrary to God's purposes (just like our will can be contrary to God's purposes). But God is all-knowing and all-powerful. He is working all things (even bad things) to the benefit of His children (Romans 8:28). [Note: not everyone is a child of God, if you have not repented of your sins and trusted in Jesus as Savior, you are a child of wrath (John 3:36, yeah twenty verses after the famous John 3:16).]
Another insightful reference is Luke 22:31 "And the Lord said, Simon, Simon, behold, Satan hath desired [to have] you, that he may sift [you] as wheat". Satan desires the destruction of us all. But God does not permit it.
And 1 Corinthians 5:5 "To deliver such an one unto Satan for the destruction of the flesh, that the spirit may be saved in the day of the Lord Jesus". This is a command from Paul to turn a person living in sin out of the church at Corinth. The intention here is to let the person feel the full brunt of the consequences of their sin (so they might repent and be saved). It seems those living continually in sin may be turned over to Satan for his purposes (kind of scary - ok, a lot scary).