(I assume you’re referring to devices like Huawei E5330.)
Yes, that’s how they work, after all. You install a SIM card and (ideally) you’re ready to go.
Make sure to check your contract’s conditions. Tethering (which is essentially the same) is sometimes forbidden and they might(!) terminate your contract.