I think the exact definition of a particular role varies from company to company. Moreover, In small companies, the boundaries of these roles are more blurred than in large ones. If we imagine that we are at a big company that can afford hiring both, I would say that:
- Social media manager is responsible for creating and posting content on social media
- Community manager is responsible for running initiatives that enable users and make them act.
In other words, a social media manager needs to create content that is interesting to others while a community manager needs to make users create content they are interested in.