The Pilum was a javelin with a hard steel head attached to a soft neck. It was designed to bend once it landed if it did not hit an enemy soldier.
If the pilum missed the target it would bend over making it useless. This way it could not be thrown back at the Roman soldier.
If the pilum would penetrate the enemy shield the soft neck would bend over. Removing the head of the pilum from the shield would take too much time, so both pilum and shield were then thrown away leaving the man defenseless.
When Roman Soldiers confronted their nemesis in battle, they would typically throw the Javelins first trying to take out their enemy before they had to face them head on. When they did have to face their enemy head on, this is when they would draw their Ancient Gladius Sword. The Roman Warrior usually led with their Scutum (shield) and used their sword as a weapon for thrusting attacks. Many people believe this weapon was only good for stabbing, however the truth is it was also great for chopping and cutting enemies as well.
Article Source: http://EzineArticles.com/3670506
A side note:
To keep fit and strong, Roman soldiers attended weapons training every morning. Sometimes they marched 20 miles in a day carrying all their equipment (including: spare clothes, several days' ration of food and an ax or spade).
3. Scutum (sheild)
4. Testudo formation (A protective screen formed by a body of troops holding their shields above their heads in such a way that the shields overlap)