Sounds like you are frustrated by not knowing what to do when your opponent finds your weakness. First of all, there is no "spam". There is only you getting hit with something over and over that leads to you losing because you did not know how to counter it.
If that is the case, hop into training mode, turn on the frame data dialog and put the recording mode to use. Record the character you are struggling against and perform the move(s) that are killing you. Block the moves and check the frame data. Verify if those moves are positive or negative when blocked. If they are positive on block, you must wait for pushback to push you safely away while blocking or, wait and read the opponents next move if you can predict it (i.e. you blocked so well they attempted a throw, duck the throw and uppercut them.).
If they are minus, check the amount of negative frames. Moves that are negative on block can be punished by moves that start up faster than the attacker can recover. For example:
If your opponent does a string that leaves them -10 on block, you can punish them with a move that starts up faster such as a fast standing jab that leads to a string combo that in turn leads to a larger combo if applicable. Your best bet is to use this data to learn the match-up against a character that is giving you trouble.
Having the knowledge is just part of the equation. Having the correct toolset in your bag such as a high damage combo to punish blocked attacks that are negative and knowing how to bait the opponent into leaving themselves open to counter attack are essential. Training the opponent to play by your rules is also key. You can do this by using attacks and combo strings that leave you safe on block so that you can pressure your opponent into making mistakes that open them up to counter attacks/full combo punish.
Employ mind games such as mixing up using safe mids and throws. Nuetral jump out of pressure when you know you can get away with it and land a jumping 1 or 2 into a full combo punish. Don't forget to use your defensive options when you are knocked down. Choose the best one for a given situation.
Always remember that every move in this game can be countered. You just have to learn what it is and use it. Once you do, the game converts from "He's just a spammer" to "I made him pay for relying on a weak strategy. He was not on my level." In order to get to a higher level, you must first let go of any imaginary rules that you want people to play by and play against the hardest opponents possible. You only become good by surrounding yourself with good players online/offline.
I hope that helps.