In a large pot or Dutch oven, combine ham hocks, onions, garlic, and chicken stock and bring to a simmer. Cover and cook at a bare simmer until hocks are very tender, 2 to 3 hours.
Remove ham hocks from liquid, transfer to a cutting board, and pull bones from meaty and fatty parts. Discard bones. Chop up meat into chunks and return it to pot.
Add collard greens, pressing down to submerge in liquid. Return to a simmer and cook, uncovered, until collards are very tender, about 30 minutes. Season with salt and pepper. Add vinegar to taste, if desired, then serve.
