Lava is a liquid because it is rock that has been heated up so much it has melted. But it is a very ‘sticky’ liquid – we call it highly ‘viscous’. Imagine trying to pour water and then honey down a slope – the honey flows slower because it is stickier, or more ‘viscous’. Lava is even more sticky (or ‘viscous’) than the honey.
When the lava comes out it is also immediately starting to cool down. This causes some parts of it to turn back to solid crystals. There are also bubbles of gas escaping from the mixture. So lava is actually a complicated mixture of volcanic gas bubbles, crystals and volcanic glass (the melted bit).