When you took your caliper off, there may have been some shims (super thin washers) that spaced your caliper out from your frame. Theoretically, you could have removed your caliper and when you pulled the bolts out and removed it the shims fell on the floor without you knowing. So you need to get some shims from your lbs or very thin washers from the hardware store. Add/remove shims until your caliper clears your pads.
OR if you have mechanical disc brakes you should be able to adjust the pads by rotating some adjustment knobs on it. Or tighten/loosen your brake cable.
Hope this helps. If I was with you it would be a lot easier to show you than describe.
Good luck to ya!