I believe the game you are talking about is called Castle.
52 card deck(with or without Jokers)
Each player is dealt three cards face down, and then three more cards face up. Although you typically don't get to see the face down cards, some variants exist that allow you to choose the better cards for later play. Each player is then dealt 5 cards, which they use to play. The remainder of the deck is placed in the center of the table.
Cards from lowest to highest are 3, 4, 5, 6, 7, 8, 9, Jack, Queen, King, and Ace. 2, 10, and Joker are special cards (see below.) Suites do not constitute to card hierarchy. The player with the lowest card usually goes first, but can play any card. The next card must either match or succeed the card just below it in rank(i.e., the next card can't be lower.) The deck and player's current hand must be empty in order for the face up cards to be played; the face down cards follow next, but, depending on the rules, you usually can't look at them until you play them. Players take turns playing a card or cards, and the first player to play all their face down card wins.
SPECIAL CARDS(can be played on top of any card, regardless of rank):
2: 2's "reset" the deck, meaning you can then place any card on it afterward (build), or place nothing else and move on to the next player's turn (hold).
10: 10's "clear" the deck, which means all the cards beneath the deck are removed from the game and cannot be used later on.
Jokers: The Jokers can be used as either a 2 or 10, but not both of them. The player must also declare which card they want action they wish to perform with it (clear or build/hold).
4-Of-A-Kind: While not technically a special card, 4 cards played in a row clears the deck automatically. However, all 4 cards don't have to be played by one person; as long as there are 4 of the same cards in a row, the discard pile is cleared and removed from the game.
But, wait! What if I can't play any card???
The unfortunate player who can't play any card (all the cards in their hand are lower than the last discard card, and they don't have a 2, 10, or Joker) must pick up the discard pile, and add it to their own hand.