Jesus freed many people from demons and we can be free too (Luke 8:2, Luke 11:14, Matthew 12:22, Mark 16:9, Matthew 8:16).
A speculation on the origin of demons can be found here in my book: Pride is the Problem, chapter 8, “Demons and homosexuality.”
Demons are disembodied people who desire to live through humans to fullfil their perverted desires. They fear God, they’re highly deceptive, can give the host great power, and they know who the true children of God are. A time is coming when they will be judged for their abuse of mankind.
Here are a few scriptures that give more insight about demons: Matthew 8:28-34, Matthew 12:43-45, Mark 5:2-20, Luke 9:37-43, Acts 16:16-18, Acts 19:11-16, 2 Corinthians 5:10.
Happily, as children of God, we’ve been given authority to overcome evil spirits. We can beat and cast out unclean spirits by humbling ourselves in submission to God, and resisting their lies with the truth (Ephesians 6:12-, 2 Corinthians 10:4-5, Luke 10:19, Mark 16:17, James 4:7).
Whether the demon is within, attached, or harassing us from without, some demons won’t go away because of pride. We must humble ourselves with prayer and fasting; and they will have to leave us alone (Matthew 17:21, Psalm 35:13).
Also, we must not fellowship with the wicked (1 Corinthians 10:21, 15:33).
Throughout this life, we’ll have to fight evil spirits, the goal is to prevent them from making our bodies their home and beating them with God’s truth.