Chemical structure of a receptor ligand, or of proteins in general?
If the latter, then it is called tertiary structure, which determines folding: the amino acid sequence in very complex ways causes the protein to be tangled up into lumps, helices and sheets, and often combinations of such structures.
How it works basically is that a protein is first and foremost a chain of amino acids which have residues hanging off of the sides of each link, and those residues can hook up to one another in pairs. Unlike the regular pattern of pairs in DNA, protein amino acid residues combine much more 'chaotically', but also with method to the madness. Irregularly, but making exact matches in order to get the right tangle to produce functional proteins / enzymes.
If the former, then it is the amino acid residues that hang off the amino acids that are exposed on the 'surface' that are left over and do not pair to make the tertiary structure of the protein, which are able to interact with ligands. The ligand is like a key fitting a lock, with specific chemical structure and properties (shape and electronic / polar or non-polar groups at particular positions). The shape fits the shape of the protein AND the groups hanging on the outside of the protein match the ligand's in such a way that there is pushing, pulling and binding. This causes a leverage which triggers a change in the way the protein is folded with all sorts of consequences, like making it detach a part of it or opening up a pocket on another side where other ligands can act - it can cause many mechanical, electrical or enzymatic events.
In the case of receptors, it can cause activation of the receptor if bound right... which triggers chemical signals to be sent on the opposite side of the receptor protein, which lies on the other side of a cell wall barrier, where messengers propagate the signal and/or polarization changes of the neuron are effected by IIRC flux of ions through channels.
But correct me if I'm wrong.