Lava cools very quickly at first and forms a thin crust that insulates the interior of the lava flow. As a result, basaltic lava flows can form crusts that are thick enough to walk on in 10-15 minutes but the flow itself can take several months to cool! Because of the insulating properties of lava, it cools slower and slower over time.
Thick stacks of lava flows (30 m or 100 ft thick) can take years to cool completely. An extreme example is a lava flow that was erupted in 1959 and partly filled a pit crater (Kilauea Iki). The "ponded" flow was about 85 meters thick (about 280 ft thick). It was drilled in 1988, and there was still some mushy, not-quite-solid stuff down near the bottom, 29 years after it erupted!
Image Credit: Scott Rowland