I learned that an ideal solenoid creates a magnetic field, and it can be thought of a continuous circular loops. While the magnetic field created by a single loop is dependent on the radius of the loop, then why is the solenoid independent? And why is the magnetic field inside a solenoid homogeneous?
In a finite length solenoid the field strength is not homogenoeus but instead the longer the solenoid is the smaller the axial variation of the field is, it is approximately constant along the axis especially in the middle. Toward its ends the magnetic field has a complicated shape as it loops around and diminishes in strength. The near homogeneity of the field in the coil's middle is caused by the near homogeneity of its generating loop currents far away from the ends. The longer you make the coil relative to its radius the better the approximation is but it is never perfect.