Some athletes, basketball players, for example, volunteered at the soup kitchen twice a month.
Some athletes—basketball players, for example—volunteered at the soup kitchen twice a month.
The second sentence correctly uses dashes to enclose a parenthetical example.