In draw games, particularly those with multiple draws such as 2-7 Triple Draw and Badugi, it is possible for more cards to be needed than are remaining in the stub (the cards in the deck which have not yet been used). If the original 52-card deck is insufficient for the dealer to distribute the number of cards requested by the active player, the remaining cards in the original stub and all of the cards discarded by players previously (including those discarded by other players on the current drawing round) are shuffled together to make a new stub. Play continues from that point using the new stub. Multiple reshuffles of this nature are possible during a hand, depending on the action.
In games with a single draw, the active player's discards are not used in the reshuffle, so it is impossible for you to receive back a card that you have discarded on the draw. In games with multiple draws, once a reshuffle has occurred, the server will prevent a player from receiving back any specific card they have previously discarded.
Thus, if you throw away the deuce of spades, it is impossible for you to receive the deuce of spades back on a future draw, even if the discards have been reshuffled into a new stub.
Reshuffles are unique to Draw, and do not occur in Stud games. In the event that there are not enough cards left to deal the last card to all remaining players in a seven-card stud game, a community card is used, which is placed face up on the table and is shared by all players.