Sounds like you're playing some Texas Hold'em!
You have 2 cards in your hand, leaving 50 cards that the other 5 will come from. There are 2118760 different sets of 5 cards out of those 50. (That's "50 choose 5" = 50! / (5! * 45*)).
There are 11 spades left in the deck. The number of ways exactly 3 spades can show up in the next 5 cards is:
(11 choose 3) * (39 choose 2) ! you want 3 of the the remaining spades plus 2 non-spades
(11! / (8! * 3!)) * (39! / (37! * 2!))
165 * 741 = 122265
So the odds of exactly 3 spades being flopped is the number of "good" hands divided by the total number of possible hands: 122265/2118760 =~ 5.7%
If you want the odds of 3 or more spades, you need to calculate the the number of possible hands with 4 spades and 5 spades:
4 spades = (11 choose 4) * (39 choose 1) = 330 * 39 = 12870
5 spades = (11 chosoe 5) * (39 choose 0) = 462 * 1 = 462
(122265 + 12870 + 462) / 2118760 =~ 6.4%
For the example you provided, it's really more complicated than that. The odds of getting making a pair is different than the odds of making a pair or better (2 pair, 3 of a kind, full house, etc.). I'm sure the odds of all these events are already out there on the internet. If you interested in how to compute them, you've come to the right place!