In medieval times it was a free commune; later it was subjected to Cesare Borgia, the Sforza and the Papal States.
This passage describes how the location in question went through periods of autonomy (free commune) before being subject to various powerful entities like Cesare Borgia, the Sforza family, and the Papal States.