ditto about the grease.
if the cog you're using is steel, and the hub is aluminum, they can "bond" somehow and it REALLY REALLY sucks. it can happen with seatposts and stems too. it usually takes a looong time and a lot of neglect for it to happen though, so my guess is that you just need to give it a little time and some WD-40.
something else that might help in addition to the WD40 is to take a screwdriver, or other thin implement and run it around the "seam" where the cog is threaded onto the hub to maybe get any grime that may or may not have accumulated in there.
oh, you did recite the sacred incantation, right? because it won't work unless you recite the sacred incantation...