You can most certainly put cloth in the microwave- as long as it's a kitchen towel or other thin cotton fabric. Heavier fabrics, like denim, will block microwaves and could potentially start a fire. If you're unsure whether your fabric is safe to microwave, err on the side of caution and don't do it.
When using a kitchen towel or other thin cotton fabric in the microwave, make sure it's damp (not soaking wet) before putting it in. This will help prevent any potential fires. Place the damp towel on a plate or other flat surface, then heat it on high for 30-60 seconds. The exact amount of time will depend on your microwave and how much moisture is in the towel.
Once you take the towel out of the microwave, be careful! It will be hot and steamy. Use oven mitts or another form of insulation to avoid getting burned.