How to use Sandbox test widget

How to use Sandbox test widget

May I know what're the differences between production env and sandbox env?

Our IT team would like to test their widget in sandbox but they don't know how to separate data.

Maybe we have a global variable to identify that this is the sandbox environment?