You are asking about nucleic acid aptamers, which you probably encountered while reading about a product that required specific binding.
An aptamer is a short segment of DNA, RNA, or peptide that binds to a specific ligand like antibodies do. The ligand may be a small molecule or may be a protein or even a cell.
Aptamers are usually synthesized and isolated by repetitive screening of large pools of randomized molecules for those that bind best to the target ligand. They are used in basic research and in various applications, e.g., diagnostics and therapeutics.