@Unaligned_Coder Welcome to the forum.
You “unspam” a message by manually moving it back to a different folder.
K-9 does not do any heuristic on the mails. If you mark a mail as spam and receive the exact same message repeatedly, K-9 will not “auto spam” the copies.
This only works in conjunction with your mail server. If it is able to, it will analyse what you put into the spam folder. Then the server (not K-9) can learn from the mails and move future mails automatically.
However, you must prepare corresponding rules on the server. This is a bit tricky as K-9 only moves the mail into the spam folder. It does not mark the mail with a spam marker. Thus, many server-side rules cannot apply (e.g., move to spam if spam index is 5* or above).