The CRSP/COMPUSTAT MERGED (CCM) manual explains the details, but in general, CCM gives a linked PERMCO to every COMPUSTAT GVKEY, with both being a company concept, and if an associated PERMNO exists and is matchable, it is linked as well (to cover the equity-security concept).
In some cases, a PERMCO is created for a GVKEY just for the CCM tables without any associated ID in any CRSP databases.
So, not every CRSP PERMNO has an associated Compustat GVKEY and not every GVKEY has a usable CRSP company-security (PERMCO-PERMNO) pair.
There are cases where a PERMNO in CRSP has no COMPUSTAT GVKEY link and vice-a-versa.
For more on the data, see the CCM Overview in the Support section of the WRDS web site.