I'm gonna guess you have an unsealed hub? Or a sealed hub with 2 locknuts.
For unsealed, you need one of these cone wrenches
[LINK TO IMAGE]
in the 13mm option I think, 15mm if it's a 14mm axle I really should know that offhand but I forget haha. But either that or a skinny enough wrench to get behind the outer locknut. Place this wrench on the inner locknut & then use an adjustable wrench on the outer one & holding the inner nut in place, loosen the outer nut. It might take some force but it'll come.
Once you have it loose, it gets tricky. Tighten the inner locknut JUST A HAIR. Do this in small intervals, unsealed wheels are very sensitive. Too loose will cause it to rattle, too tight will cause it to not spin & can damage your hub even more. So tighten it just a hair & hold that nut in place with the cone wrench then tighten the outer nut against it with the adjustable wrench, while being careful not to move the inner nut so it doesn't loosen/tighten up on you. Just snug it up in case you have to make an adjustment, don't tighten it really tight just yet. See if the wheel spins nicely & hold the axle & the rim to see if there's any place in the hub. If it spins freely & has no play to it, you're good to go & you can tighten the locknut fully now but make sure you use the cone wrench on the inner one so nothing moves around.
If it has play in it though, loosen the outer locknut & tighten the inner one just a hair more, snug the outer one up, then try again. If it doesn't spin or feels really grabby inside the hub (IE spins like shit) then loosen the outer locknut & loosen the inner locknut a hair, snug the outer one up, then try again.
If it's a sealed hub though, then use the correct cone wrench (sizes vary from hub to hub) & loosen the locknuts & just tighten up the inner locknut while tightening the outer locknut against it. Sealed hubs aren't as sensitive as unsealed ones but be sure to make sure the wheel doesn't spin like shit cause the hub's too tight either. Hope this helped, if none of this works then it's probably a bearing issue or broken axle.