What you are looking at is a vintage/ antique style of smudge pot. Although the top part held a wick which would be lit, the bottom part held slow-burning oil, not explosives, so you can relax.
The Wikipedia article on smudge pots says that they are used mainly for preventing frost on plants, and shows a larger, more modern variant, and lists several other usages over history. My family had one as a kid that looked similar to yours, but was used as a mosquito deterrent, I would guess filled with a citronella-based oil. (Today, one sees similar things in a tiki-torch looking device.) Given their use by construction crews as road flares, this might be where we got the one we had, as Dad had worked highway construction before I was born, and was occasionally able to obtain surplus.
For your use today, if it is clean and in good condition (i.e. not rusted through) it may have value to the right antique collector- I see prices on Etsy of $40 to $70. Otherwise, it might make a neat piece of decor. In any case, you needn't fear it, it should be completely safe to touch.