A rule is a user-centered statement that enacts business logic and end-user automation in the community by harnessing system actions to events, conditions, and actions.
Generally, from the site home page, click Pencil Tool > Administration > Rules > Rules. Click Add Rule. Go through the wizard, starting with a trigger event you want to trigger the behavior. Progress on to Conditions and Actions. You can model new rules off the ones included in the administration panel for achievements.