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.
For more help, see sections P6-b to P6-d.