In most cases, you can use a phone charger to charge a tablet, but the charging speed may be slower as tablets usually require higher current.
Not all chargers are compatible with all devices. You should use a charger that is compatible with your device to avoid damage or safety issues.