Odd Keystones act like containers, capable of trapping and binding Spiritomb inside themselves. All Spiritomb use them as a base.
In the games
In Pokémon Diamond, Pearl, and Platinum, they can be found by digging in the Sinnoh Underground, and one can be found with the Dowsing Machine in Twinleaf Town. A Black Belt just west of Hearthome City hands one to the player, indicating not to ask questions about it, before describing the procedure to summon Spiritomb.
The procedure is as follows. The player must take the Odd Keystone to the broken-down tower on Route 209 and place it there. After this, the player must go underground and talk to 32 other players, and after having returned to the surface, Spiritomb will appear the next time they inspect the Hallowed Tower.
Though the technical requirement is to talk to 32 people, the player needs only to talk to one person 32 times, either leaving the Underground after each time or entering and exiting their Secret Base using the "close door and decorate" function, for it to count separately for both players.
Once placed in Hallowed Tower, the player can check the Odd Keystone every now and then to get an idea of their progress towards unlocking Spiritomb. Progress is indicated by gradually changing responses from checking the Keystone; the responses change as the player talks to more people Underground.
In Pokémon Black 2 and White 2, it can be obtained from one specific antique shop variant in Join Avenue. To obtain in any other game, the Odd Keystone must be traded from within said game's respective generation.
In Pokémon Omega Ruby and Alpha Sapphire, the Odd Keystone is reduced to a minor cameo appearance on the Sea Mauville, which will appear just before the player faces Spiritomb and therefore cannot be collected.
In the Pokémon Mystery Dungeon series
When the player and partner first arrive at the pit of Sealed Ruin, they will only see an Odd Keystone not realizing it is a Pokémon. After a moment it will reveal itself to be Spiritomb and attack the player.
When Spiritomb is sleeping, it goes back into the Odd Keystone.
In the anime
In The Keystone Pops!, Ash and Dawn were training their Buizel and Aipom, when Buizel's Sonic Boom destroyed the Hallowed Tower. A Spiritomb then rose from the debris and began wreaking havoc. Ash and Pikachu eventually battled the Spiritomb, and once it was hit by Pikachu's Thunderbolt, Spiritomb retreated back into the Odd Keystone, and the Hallowed Tower was rebuilt.