A sandbox is used for development and testing purposes. It is useful as it allows Apex programming without disturbing the production environment. If you want to test any newly developed application of Visual page or Force.com framework then you can test and develop its sandbox instead of testing it directly.
Sandbox, therefore, helps in developing an application in a hassle-free manner and then data and metadata can be migrated to the production environment. In this way, developers can test their applications freely even if there is a non-production environment. Sandboxes are of the following types:
Developer Sandbox
Partial Copy Sandbox
Developer Pro Sandbox
Full Sandbox etc.