I'm going to answer this question assuming that you have used the Naive Bayes classifier for classification.
Naive Bayes classifier is a rather simple algorithm that has been successfully employed in the field of spam detection.
The naive bayes classifier is based on Conditional Probability and makes use of the following equation:
P (a|b) = P (b|a) * P (a) / P (b)
Suppose that there are two classes that a Naive Bayes classifier can classify a piece of text (email) into, spam and not spam.
The equation mentioned above applied to the task of spam detection can be translated as follows:
P (class | text) = P (text | class) * P (class) / P (text)
Since the text is made up of words, it can be represented as a combination of words. text -> w1, w2, ....., wn
This translates to,
P (class | w1, w2, ..., wn) = P (w1, w2, ..., wn | class) * P (class)
/ P (w1, w2, ..., wn)
Since the Naive Bayes classifier makes the Naive assumption that the words are conditionally independent of each other, this translates to:
P (class | w1, w2, ... , wn) = P (w1 | class) * P (w2 | class) * ... *
P (wn | class) * P (class)
For all the classes ('spam' and 'not spam' in our example).
I dropped down the denominator since it will be common for all the probabilities.
Where, P (class) is the probability of a given class ('spam' and 'not spam'). Suppose, that you have 100 training examples of which 60 are spam and 40 are not spam, then the class probabilities of 'spam' and 'not spam' would be 0.6 and 0.4 respectively.
P (w | class) is the probability of a word given a class. In the naive bayes classifier you count the probability of each word in a given class.
Let's consider the example that you have given,
Get 10000 dollars free by clicking here.
The naive bayes classifier would have already calculated the probabilities of the words Get, dollars, free, by, clicking, here in your sentence in a given class (spam and not spam).
If the sentence was classified as spam, then you can find the words which contributed most to the sentence being spam by finding out their probabilities in both spam and not spam classes.
Here you can find a Simple Naive Bayes implementation applied to the task of spam detection in emails.