How close you can get depends on what kind of lava flow it is, and whether you are upwind or downwind.
For example, the most approachable lava is pahoehoe. This is because each toe forms an insulating skin seconds after emerging on the surface. This skin is at first flexible and then hardens, but even when flexible it is a good insulator. This serves to keep the interior of an active pahoehoe toe hot and fluid but also prevents you from getting burned by the radiant heat. If the wind is at your back, you can easily approach long enough and close enough to get a sample with a hammer. It is still hot, and unless you are well-protected you can only be that close for a minute or so. You also notice that as soon as you peel the skin off to get at the molten interior, th! heat goes way up. This is heat that you can't stand, you have to get back otherwise blisters start to form. It is hot enough that you can't accidentally step on active lava.
Skylights into lava tubes on pahoehoe flows are quite hot, and have to be approached from upwind. They are so hot that the air shimmers over them so they are hard to miss. They are dangerous not as much because of the radiant heat from the lava inside but because of the super-heated plume of air coming out. You have to be really careful that the wind doesn't shift, and many a volcanologist has gotten singed skin and hair when the wind changed.
An a'a flow is terrible to work near. Instead of a relatively continuous skin, a'a flows have discontinuous layers of clinker, and a huge amount of radiant heat escapes from between the clinker. 'A'a flows also move faster so you really have to be quick on your feet if you want a sample. Additionally, 'a'a flows tend to form open channels rather than lava tubes. The channels can sometimes have completely incandescent surfaces because they are flowing so fast that any skin that forms is immediately torn or sunk. We remember once flying over a large channel in a helicopter. We must have been at least 200-400 meters above the flow, but as soon as we were over the channel we could immediately feel the radiant heat through the windows! We would bet that nobody has been downwind of an active 'a'a channel.
Lava won't kill you if it briefly touches you. You would get a nasty burn, but unless you fell in and couldn't get out, you wouldn't die. With prolonged contact, the amount of lava "coverage" and the length of time it was in contact with your skin would be important factors in how severe your injuries would be! The health of the individual, the amount of time before care can be given and the quality of that care would also be important. In fact there have been 2 cases at the Hawaiian Volcano Observatory where a geologist fell into lava. Fortunately in both instances the lava was not very deep and they were able to get out quickly. Both ended up in the hospital and it was a scary and painful experience. Both recovered fine. Blong (1984) points out that little research has been done on injuries caused by lava. People have been killed by very fast moving lava flows. A recent example was the 1977 eruption at Nyiragongo.
Source of Information:
Blong, R.J., 1984, Volcanic Hazards: A Sourcebook on the Effects of Eruptions: Orlando, Florida, Academic Press, 424 p.