There are two important things to understand when pulling the trigger to put a shell downrange: penetration and damage. Penetration is when the shell actually manages to pierce a tank's hull, while damage affects the hit point total of the targeted tank. To put it simply: if you don't penetrate, you don't do any damage.
To ensure you're putting yourself into the best position to deal maximum damage with every shot, you need to take into consideration the angle of the enemy's hull to that of your barrel. If the enemy hull is slanted in relation to your barrel, your shell may simply ricochet right off the side of their vehicle and you'll have wasted a shot. Try to line up a shot that travels perpendicular into the facing of the enemy’s armor.
Another element that causes a ricochet is the thickness of enemy armor versus that of the type of shell your vehicle can fire. If you're in a light tank and you fire on a heavy tank, your odds of penetrating and dealing damage to that heavy hull are very low.