Collecting a level key unlocks the level it belongs to automatically. There is nothing extra to activate.
The moment you collect the key, the lock icon on the corresponding level disappears and it becomes playable from the level select screen. Keys are placed in the developer-made levels as a way of gating content, so finding one is the entire mechanism.
If you got a key while playing someone else's level or through a community chain, the same rule applies — it unlocks on your account and stays unlocked. You do not need to return to the original level or do anything with the key item in your inventory.
The usual causes are that the key belongs to a level you do not have access to, or that the unlock did not sync. Restarting the game forces a refresh of the level list, which resolves most cases. Keys tied to DLC will not unlock anything if you do not own that DLC.