So, the magician, let's call him A, hands a deck of unmarked playing cards (52 cards, 13 in each suit, no jokers) to an audience member, call him C. C draws 5 cards from the deck (at random, or by selection, it doesn't matter). C then hands those 5 cards back to A.
A examines the 5 cards, selects one, and returns it to C. A takes the remaining cards, and places them in a stack, face down, on a table, and walks away. Maybe leaves the room.
At this point, B enters the room. You knew there was going to be a B. B is the magician's assistant. B walks up to the 4 cards on the table, picks them up, examines them, and is able to tell the single card that C is holding (the 5th card from step I).
No, really, it's math. A lot of card tricks are math. A lot of card tricks are sleight of hand, but not this one. If you like, instead of putting the cards facedown on the table, the cards could be laid out, face up, left to right, on the table.
A and B do no communicating - A could have left the room through the stage left door just as B was entering the room from stage right. All of the information is in the cards.
Also, in case it ruins it for you, maybe these cards are like UNO cards with one big number and a color, in which case, not only are they face up on the table, the top of the cards face away from the audience, so A can't give hints to B by rotating the cards in a peculiar way.
I guess when I said that A does no communicating with B, I was lying - clearly, B can rule out 4 possibilities based on the 4 cards on the table. But B can also rule out 47 more possibilities somehow.
My coworker mentioned "the pidgeonhole principle", which divided the 48 possibilities by four for me.
I then did some simple combinatorics, which got me a means to communicate a number from 1 to 6, inclusive. But I was still one bit short.
I finally sat down and drew a diagram, and realized that I was just about there from day 1.
Anyway, woo me! I figured it out.