The javelin is the first ranged weapon available to new players.
The javelin has two modes of attack. Left-clicking with the javelin will do melee damage, and right-clicking will throw it (similar to how the bow works in vanilla Minecraft). The javelin does more melee damage than fists, but less than an axe. The javelin quickly loses durability from using its left-click melee attack and from being thrown on a target.
The javelin can be charged-up for more damage and distance prior to throwing it, by holding down the right mouse button. The javelin can be retrieved from the ground.
Create a javelin by knapping a javelin head, and then in the crafting box, assembling the javelin head with a stick below it.