You must make sure you replace your inner tubes with a tube that is the right size according to the diameter and width for your tyre. The size is almost always written somewhere on the sidewall of the tyre for easy reference.
Inner tubes typically state a wheel diameter and width range for which they will work, e.g. 26 x 1.95-2.125", indicating that the tube is intended to fit a 26 inch tyre with a width of between 1.95 inches and 2.125 inches.
Another example might be 700 x 18-23c, which seems less obvious but 700c is the diameter of Road, Cyclocross, Adventure Road and Hybrid bike wheels, and the numbers relate to the width in millimeters, so 18mm-23mm wide.