Coins are encased in special plastic holders made out of a plastic that does not react with the coin (mylar I think it's called) and turn it horrible.  Once encased (or entombed) in the plastic, the grade of the coin is printed on the top of the holder, so is the year minted and denomination along with a barcode.  The barcode is unique to that slab and identifies the coin in the grading company's records.  It's mainly an American practice done by such companies as PCGS.  However, most of the companies (maybe all) won't accept fakes or cleaned coins.  In the picture below, the certification number is highlighted, also unique to the slab.  It is extremely popular in the US to provide some kind of proof that Mr. X's coin is the grade that Mr. X says.  Most people don't like it, especially the Brits.  It's quite hard, or so I've heard, to release a coin from its slab.