The Bible is silent on the origin of demons.
They are not the spirits of evil men who died in a pre-Adamic world before Eden. This is suggested by those who hold to the Gap Theory. They are not fallen angels as is commonly held.
The current understanding many people have of Satan’s fall comes from the medieval Catholic Amillennial theology and from John Milton’s classic poem “Paradise Lost”. The only account of Satan and his angels being expelled from heaven is in Revelation 12, which Premillennialists believe is an event which happens in the future Tribulation.