Ijtihad is the effort a qualified jurist expends to derive a ruling from the sources; taqlid is the acceptance of a qualified jurist's ruling without re-deriving it. Between them they describe how Islamic law is actually held by scholars and by everyone else, and the relation of the two has been argued about for a thousand years.
The best-known claim is that "the gate of ijtihad was closed" from roughly the tenth century, after which jurists worked within the established schools rather than independently. The formula was long repeated in Western scholarship as settled fact. Wael Hallaq's 1984 study "Was the Gate of Ijtihad Closed?" argued that no such closure was ever declared, that jurists continued to claim and exercise ijtihad, and that the phrase describes a later perception more than a historical event. That revision is now widely, though not universally, accepted.
Traditionalist Sunni scholarship defends taqlid as a discipline rather than a defect: the four schools represent accumulated and tested competence, the qualifications for ijtihad are extremely demanding, and untrained derivation from scripture yields arbitrary results. On this view a layperson follows a school for the same reason a patient follows a physician.
Islamic modernists took the opposite line. Jamal al-Din al-Afghani, Muhammad Abduh and Rashid Rida in the late nineteenth and early twentieth centuries called for renewed ijtihad, sometimes over the heads of the schools, as the means of meeting modern conditions; Fazlur Rahman later argued for an ijtihad reaching to the Qur'an's underlying purposes rather than its particular rulings. Critics answer that ijtihad claimed without the classical training is not ijtihad at all.
Twelver Shia jurisprudence never adopted the closure. A living mujtahid exercises ijtihad, and lay believers are required to perform taqlid of a living marja al-taqlid whose rulings lapse at his death, obliging each generation to attach itself to a living authority. That single rule does much to explain why Shia clerical hierarchy took a shape Sunni Islam has no exact equivalent to.