# who stood opposite them to give praise and to give thanks, responding section by section
This refers to how they sang some of their songs in worship. A leader or one group would sing a phrase, then one or two groups that "stood opposite them" would sing a phrase in response.
# obedience to the command of David
King David had commanded the Levites how they were to organize and lead worship.