Yes. You can swim in lava. Lava is a block of fire that emits lights and damaging fluid. While swimming in lava, your speed will slow down, and also it will cause more harm.