Typically, we speak of mainnet and testnet as the networks of Stacks. Most wallets will be configured to mainnet by default—this is the production environment, the actual blockchain that holds real STX tokens.
As the name suggests, testnet is a public network for testing. It's a separate blockchain state that holds test tokens, which have no value.
Developers are encouraged to use StacksTestnet for testing before rolling out applications and contracts to StacksMainnet.
There is even StacksDevnet and StacksMocknet for working in a local development environment for development.
Stacks.js functions can be configured to use whichever network you want.