You asked specifically about 1 Thessalonians 5:18; because it's part of a larger thought, let's back up a bit and look at verses 16-18.
"Rejoice always, pray constantly, give thanks in all circumstances; for this is the will of God in Christ Jesus for you."
This letter, written by Paul from Corinth to the fledgling church in Thessalonica, is the earliest of his known writings. It concerns very basic questions of faith and, especially, questions of how to live one's life while awaiting the coming of Christ consciousness that Paul preached. In this concluding exhortation Paul sums up clearly, simply and profoundly how to do that.
What's important to note is that Paul, like Jesus, is less concerned with actions taken than with thoughts held in mind. If our minds are properly aligned to the divine energy of our indwelling Christ, our actions will unfailingly express that energy. If, on the other hand, we act obediently but harbor negative thoughts, those thoughts will express in our life experience.
So Paul offers three clear directives: rejoice, pray and give thanks. We rejoice when we stop feeling like victims or outcasts, and instead fully embrace the rich possibilities of this life experience. We "pray constantly" by remaining in careful and conscious alignment with our own Christ Presence, so that our source for all things is always the spiritual Source of love and enlightenment that is always available to us. And we anchor and expand our sense of Oneness with Source by following the example of Jesus Christ and giving thanks—not just for blessings already received, but for the certainty that blessings will always flow so long as we are open to receiving them.