How to select?

ive seen people in tutorials automaticly select a group and change selection the same. can someone tell me how this is done?