Do you mean a sandbox or test environment?
If so, is this for CRM online or on-premises?
In any case there is no special setup needed. For CRM on-premises you can just add another organization to your deployment to use for testing. For CRM Online you can sign up for a trial to test things out or purchase a non-production instance .