St. Thomas gives one of his main expositions on the virtue and act of faith in the initial questions of the Second Part of the Second Part of the Summa Theologiae.
As regards the faith of the demons mentioned by the Epistle of St. James, we can say the following: the faith of viatores (those still on the way to the beatific vision, or at least their particular judgment if they are not among the elect) is an infused supernatural habit of the intellect inclining it to believe what God reveals on the authority of God revealing, but under the influence of the will moved by at least actual grace. If one is in the state of sanctifying grace and infused charity, then faith is said to be “formed,” and one’s good works done out of love for God known by faith are fruitful, living and meritorious of heaven. If one has lost charity through mortal sin, then the virtue of faith which remains is called “unformed,” but the act of faith which the virtue makes easier is still voluntary. The assent of faith is voluntary because the motives of credibility (miracles, prophecies etc.) give reason a very high degree of “probable certitude” (the phrase is from Thomas) that God has revealed Himself, not an absolute certitude as in mathematics and the first principles of reason where the intellect cannot not assent to seen truth.
Thus there are two major differences between the faith of the demons and the faith of Christians. First, due to their higher intellectual nature, the demons have an exhaustive knowledge of the properties of all nature, so that when they witness true miracles they know that no natural cause brings them about. They therefore know that God alone worked the miracle, and they know that God would not work a miracle unless in association with a true prophet speaking in His name, inspired by Him. Thus their intellects are forced to know that God vouches for the truth of revelation, in the way that our intellect is forced to know that two and two are four (for example). So their faith in God revealing and in what he reveals—being perfect metaphysicians they know God can neither deceive nor be deceived—is a “forced faith,” as St. Thomas puts it, not a voluntary faith. Secondly, the faith of the demons can never be living faith formed by charity, since they voluntarily determined themselves against God, in other words damned themselves. St. Thomas’s theology of how and when angelic and human wills definitively turn themselves toward or away from God is another topic.