Weapon skill represents your proficiency with a particular Weapon. The basic formula for your maximum weapon skill at a particular level is (5 * level). The rate at which you gain them depends on your Intellect score and the speed of the weapon. It's typically better to use a fast weapon to train up your skills.
Effects of Weapon Skill
Each point of weapon skill you have over your opponent's increases your chances to crit and hit by 0.04%, and reduces your opponent's chance to block, parry, and dodge by 0.04%. Effectively you can consider it to be the inverse of the defense skill.
In addition, against mobs that are three or more levels above you, you will have a chance to land a glancing blow instead of a normal hit. A glancing blow may not crit and has a damage reduction proportional to the weapon skill to defense difference. Weapon skill reduces the severity of the damage reduction, not your chance to land a glancing blow.
For example, against Onyxia, with 300 weapon skill approximately 25% of your hits will be glancing blows, and the damage for those will on average be reduced by 33%. With +5 weapon skill, you will see the same amount of glancing blows (25%), but only 15% damage reduction. With +10 weapon skill, the damage reduction becomes negligible.
The amount of weapon skill necessary to ameliorate the damage reduction may vary among bosses. For instance, anecdotal evidence indicates that Skeram may reduce damage from glancing blows by up to 70%.