Card counting assigns a small value to each card seen, such as +1 for low cards and -1 for tens and aces, and keeps a running total. A high count suggests the remaining cards favor the player, who may then raise bets. It requires memory, practice and fast, accurate play, and the edge it gives is small and varies with the number of decks and the rules. It is a mental skill and is not illegal in most places, but casinos are private businesses and can ask a suspected counter to stop playing. It does not remove the risk of losing.
Example
After many low cards are dealt, the count is high. The remaining deck holds a larger share of tens and aces, which raises the chance of a natural blackjack.