Shooting isn't simply a matter of pointing your weapon at the target and letting fly. Factors other than your Ballistic Skill affect the chance of hitting, such as range and cover as already discussed. There are other factors too, some of which make it easier to hit and others that make it harder. Factors that make it easier are added to your dice roll. Factors that make it harder are subtracted from your dice roll.
These are called To Hit modifiers, and they are all cumulative. So if shooting at long range (-1) at a target behind soft cover (-1), the chance of hitting is reduced by -2.
+1 Shooting at a Large Target
A large target is anything that would be massively tall or that is especially bulky. Giants, Dragons and Greater Daemons are large targets, for example, while Men, Orcs, Elves, Ogres, Chariots, Cannons and the vast majority of troops are not. In every case, the creature's special rules in the relevant Army book will inform you whether it is a large target or not.
-1 Shooting while Moving
If the shooting unit moved during the movement phase (or during the magic phase via the effect of a spell) then their chance of hitting is reduced. Even a simple turn or change of formation is enough to reduce their concentration and so counts as movement for this purpose.
-1 Target is Behind Soft Cover
If the target is behind soft cover, then the chance of hitting it is reduced.
-2 Target is Behind Hard Cover
If the target is behind hard cover, the chance of hitting it is drastically reduced.
-1 Shooting at Long Range
If the target lies at over half your maximum range, you are less likely to hit. Sometimes you will find some of the shooters are within short range and some are at long range. If this is the case, you must roll two batches of dice, one for each range.
-1 Stand & Shoot
If a unit is charged and elects to stand & shoot at its attacker, then their chance of hitting is reduced. While the enemy thunders towards them, their aim will be distracted and their shot hurried as they abandon their bows to take up their swords.
-1 Shooting at a Single Model or Skirmishers
This penalty applies if the target is a single model with a unit strength of 1, or a unit of models with unit strength of 1 who are in skirmish formation. If the target model or unit is cavalry or larger (unit strength of 2 or more per model), this penalty does not apply. See the sections on Characters and Skirmishers for more details.
For example, ten Goblins are resolving a stand & shoot reaction against a unit of Elf cavalry at long range (the Elves start their charge 12" away). Because their BS is 3, the Goblins need 45 to hit, but since their targets are charging and at long range, they suffer a penalty of -2. Each Archer therefore needs to roll a 6 to bit. The player rolls ten dice and manages to get two 6s two hits!