Role based content publishing Content created by Role A should not be published and only moderator should be able to publish it.
Content created by A should publish automatically.


How can this be accomplished in Drupal?

Cheers
That's a very broad question so I can only really give a very broad answer. There are two options that I know of for this type of workflow:


The aptly named Workflow module


  The workflow module allows the creation and assignment of arbitrary workflows to Drupal node types. Workflows are made up of workflow states. For example, a workflow with the states Draft, Review, and Published could be assigned to the Story node type.

A combination of the Workbench and Workbench Moderation modules


  Workbench provides overall improvements for managing content that Drupal does not provide out of the box. 
  
  Workbench Moderation adds arbitrary moderation states to Drupal core's "unpublished" and "published" node states, and affects the behavior of node revisions when nodes are published. Moderation states are tracked per-revision; rather than moderating nodes, Workbench Moderation moderates revisions.