Hi jaylou,
I'm not too sure about your level w.r.t playing musical instruments [I assume you can play some songs but don't know any theory?]
scales are the foundation/ building blocks of music.
Scales are used to build chords.
Normally a melody of a song would be built off a particular scale. that scale could be any scale you can imagine- the most commonly used in gospel music being major, minor and the blues or pentatonic scales [the latter two being mostly used for improvisation/ soloing- i.e, those runs you hear or more classical pieces you hear]
There are a couple of other scales you would rarely use in gospel music [unless if your really creative/ highly advanced] -eg gypsy scale, chromatic, diminished, augmented etc...
When we say someone is singing out of key, it's because they are not singing in within the parameters of a specific scale in a particular key [c major key or whichever key they are supposed to be in].
I hope this answers your question?