As any veteran DKC player should know, when you complete a level with a particular Kong, that Kong's mugshot replaces the Kremling that represented an incomplete level on the map.
The glitch is rather simple... if a level is 'Donkey-completed' and you finish it with Diddy, save, and replay that data, the level will be 'Diddy-completed' instead. It's only one-way though, so you can't make a Diddy-completed level into a Donkey-completed one.
I believe there are some extra things involved with this glitch when it comes to Two Player Team's level completion counter, but it's been so long since I've tested it so I may be wrong about this: the counter will update to the mugshot changes done with this glitch, with the exception of Gang-Plank Galleon, which will still count as a level completed for Donkey even after it's been switched to Diddy's mugshot.