The capacity of batteries is indicated as XXXX mAh (milliampere/hour). If you insert this battery into an appliance which consumes 100 milliampere current continuously, the operating time of the appliance will be around 20 hours mathematically.
In appliances without a charging function, yes. In appliances that do have a charging function, be sure to check whether the function was specifically designed for Ni-MH. If not, it’s best not to use Ni-MH batteries.