To start off, you can use the basic bow and arrow. You will need to wield your bow as your weapon by clicking on it in your inventory, and then click on your arrows to hold them in your quiver. You will see your character now ready for action. Just like normal fighting, to start attacking you simply select attack on the monster you want to start ranging. You will see your character start taking arrows from his/her quiver and shooting at the enemy.
You can either attack up close or you can use an obstacle to stop the monster from reaching you. This is a useful tactic to avoid damage and can be seen in the picture below. However, be aware that some monsters have their own ranged weapons and will attack you from a distance as well. An important point is that some of your arrows fall next to the monster and you can pick them up to use them again. However some are damaged and are not recoverable; approximately four fifths of arrows fired are recoverable. The better the metal of your arrow, the more you will recover as they are less easily damaged.
Experience points you receive towards your ranged skill depend on which of the three attacking styles you are using, shown below. With Accurate or Rapid styles, for each damage point you inflict you will receive four ranged xp and 1.33xp hit points xp. However for Longrange, you will receive two ranged xp, two defence xp points and 1.33 hit points xp. It is up to you the style you want to train with, however it is generally accepted that you get the fastest xp by using the Rapid style. A quick example is that if you hit a 12 on a Hill giant using the accurate style, you would receive 48 ranged xp and 16 hits xp.
It is worth noting that a shortbow fires arrows faster than a longbow. How often you inflict damage depends on the value of your ranged attack of your equipment and the ranged defence of your opponent. This also applies in the reverse situation; how much you get hit depends on the value of your ranged defence and the ranged attack of your opponent. How much damage you inflict depends on the value of your ranged strength.
Your ranged attack and increases by wielding a better bow or wearing special leather armour as described below. Ranged defence works in the same way. Ranged strength increases with higher-quality ammunition. For example, scorpions naturally have good solid body armour which would be hard to hit. How hard you hit increases with a higher ranged level and a higher ranged strenth. A higher ranged attack only affects how often you hit.