Anybody can shoot a gun, but not everybody will hit what they are aiming for. This article gets you familiar with the guns.
Guns are the most common weapon type used in World of Warplanes.
Planes mount different sized guns, which do more damage depending on what caliber the gun is. Currently, guns range from 7.62 mm machine guns on tier I fighters to massive 45 mm autocannons mounted on high-tier aircraft. It can be important to know how effective your gun's caliber can be while attacking other aircraft, as armored aircraft will take less damage than lightly-armored ones. (Main article on caliber is found here). Moreover, different ammo types suit different targets better, and the main article on ammo can be found here
Here are some things to keep in mind while shooting.
As cannons keep firing without any breaks, hot gases and friction from the bullets heat up the metal of the cannon, making it lose its form. In general, this usually leads to a loss of accuracy as the barrel either expands, giving the gas more space to escape and thus reducing bullet velocity, or the barrel simply warps. The best solution to this issue is to simply stop shooting.
This mechanic is implemented into the game as well. As you shoot for extended amounts of time, your cannons will eventually begin to overheat, causing your accuracy to become quite abysmal. As in real life, the best solution for this is to simply stop shooting and allow the cannons to cool down.
In general, heavy fighters have longer overheating times than other aircraft, allowing them to put out more hurt for longer.
There are two types of ranges for aircraft.
First is the firing range. This is the limit to which your bullets will fly, and they are rendered completely ineffective upon passing this limit. You can tell when a target is in your firing range, as the lead indicator (A red square for ground targets, a red circle for planes) will appear.
Next is the optimal range. This is the area where your plane will be able to fire upon enemies with satisfactory hit rates. This means that the enemy is close enough that the enemy takes up most of the area of your bullet spread. There is no marker for your optimal range, so this is a number that you might want to remember (it is given in your plane's stats).
It is usually a good idea to hold your fire until your opponent is not too far from your optimal range, thus guaranteeing that most of your shots are hits. Though it may seem like a good idea to max out potential damage by shooting at an enemy the moment they enter your firing range, your hit rate may soon tell you otherwise.
Technologically, we have not yet mastered the art of making bullets appear in the face of an enemy the moment we fire it. Bullets need time to reach their target, so if you are aiming directly at a plane, chances are that (unless the plane is flying directly at or away from you) by the time the bullets reach where the plane was moments ago, the actual plane has moved on. Thus, it is necessary to lead your targets by a certain distance so that, in effect, the enemy "runs into" your bullets. This lead distance can vary depending on the speed of the plane and how far away the target is from you.
The game no longer has an automatic lead indicator to show where you should shoot at a plane if it keeps its present speed and course. In an actual game, planes will climb, dive, turn, and boost. The closer the enemy is to moving at a perpendicular line to your plane, the more you have to lead the target. If they are only moving at a slight angle, simply putting the aiming reticle barely in front of their nose will put rounds on target. However, if they are moving in a tight turn, you may need to place the aiming reticle as much as 1 to 2 plane lengths ahead of the target. Look carefully at the target for bullet strikes and debris. If you don't see any, you need to re-aim. Also, the tracers from your guns will show you the path of your bullets. If they are going straight at the enemy, you will probably miss. Instead ensure that the tracers are headed slightly in front of the enemy.
Likewise, to avoid bullets better, don't fly in a straight line. If you change altitude a bit, turn, and other such things, planes targeting you will have a harder time hitting you.
Though mostly unrelated to gunnery, it is a good idea to shoot at a plane from behind, which ensures that the other plane can't directly shoot back, and reduces the risk of ramming significantly. Shooting directly behind an enemy eliminates the need for deflection shooting or "leading" a target, just aim right at the enemy. However, once they start to turn, you will have to lead them again. Watch out for rear gunners however, who may shoot back at you while tailing. However, rear gunners suffer from significant range reduction compared to main guns, so don't get too worried about chasing a fleeing plane too much. Just don't let them get too far, or it'll be a waste of a good shot. Some planes rear gunners can be avoided by flying below the level of their wings. However, ground attack planes are generally so low that the chances of you hitting the ground are significantly higher when you do this.
There is another, somewhat automated but tougher gunnery, that is, "rear gunnery". The rules of "rear gunnery" are pretty simple - keep the tailer behind you in range of the rear gunner. However, this may be easier said than done, as the rear gunner has much less range and less accuracy (Which means you can't always expect your rear gunner to perform reliably. What's more, he can be knocked out). To check if the tailer is in range, you can press "Q" for a rear view, then line up the enemy to the center of the screen.