NOTE: The spear and the knife are also throwable.
You can throw it by pressing the right mouse button while holding it. It does more damage then arrows, but goes less fare and has a large deviation. You don't need feathers to craft them, or a bow to shoot them.
If you fall downwards and throw the javelin downwards, it will have a critical hit. Same as when aiming upwards.
Don't mistake them for iron or stone spears.
Not just ordinary TNT! Right click to light it! It will take a few seconds before it extinguishes. Right click again to thrwo it. Because of this you can decide how long it takes before detonation. The explosion power is half the power of TNT.