To be completely accurate what usually happened was one of two things:
Either:
a) The two lines blazed away at each other until one or the other looked like it had had enough and began to falter. (one officer summed this up nicely by noting that nothing can be done to persuade ones men to advance with the bayonet before they see the enemies backs, after which nothing can hold them back). As soon as the enemy begins to turn their backs, typically the result of men in the front ranks trying to force their way through their comrades to the rear, then the ordering of a bayonet charge usually ended the confrontation.
b) One line ignores the fire of the other and keeps advancing regardless of its losses. This tactic was used in the early eighteenth century before improvements in firearms and fire control systems made it too expensive in human lives. But basically the idea was just to keep moving forward and absorb the enemies volleys. You would get about fifteen volleys fired at you as you advanced starting at a range of around 200 paces, but at some point the enemy would get the impression that their fire wasn't having any effect and that you actually weren't going to stop. At that point they became demoralised and usually broke and ran off before you reached them. This tactic was used by the British under Marlborough and later adopted by the French who enhanced the effect by using massed columns and shouting a lot. The British always preferred to advance in menacing silence, and were actually punished for making a noise. The French preferred to make a lot of noise to try and intimidate the enemy, whilst the Prussians liked to sing hymns.
However, neither system was 100% effective.
At Waterloo for example Kempts Brigade trying to use the first option were ordered to charge with the bayonet, only to discover that the French weren't as ready to leave as they thought they were and the whole advance degenerated into a confused mess as men wandered about getting shot at by the French. Some men stopped and tried to start firing again others turned and tried to scramble back through the hedge to their original position, other probably kept going and were either shot down or easily bayoneted by the French. Officers were rushing back and forth trying to restore order, and Picton was riding back and forth screaming abuse at everyone and ordering them to reform when he was shot through the head at short range and killed. The French seeing the moment of victory in hand immediately ordered their own advance to commence and they were in the precess of driving Kempts brigade off the field when the Union Brigade descended on them to stop the rot and give the infantry time to reform.
A Frenchman also described that the second approach could also go wrong. In his own words he describes that there were certain expectations amongst the men about such an advance. The idea was that you made a lot of noise, banging drums and shouting 'Vive l'Emperor' etc. to let the enemy know you were coming, and that there were a lot of you. The enemy are then supposed to begin firing at you at about 200 paces, e.g. maximum effective range. This would create a lot of smoke and eventually nobody would be able to see what was going on, but as the French kepted making a noise the enemy would know they were still coming. At about 100 paces (still quite long range) the French expected to detect signs of the enemy panicking, because by now they realised that you weren't going to stop, and that their fire wasn't having any effect, or at least they could hear you getting closer so assumed it was having no effect. Normally by the time the French were within 50 paces of their target the enemy had withdrawn or broken and it was just a case of marching into the position they previously held and occupying it.
However, he notes that the British had a nasty habit of not playing by the rules. The first problem was that the British rarely began firing at 200 paces, no matter how much noise the French made. Instead they would stand impassively like a red wall with their weapons at the order as if nothing was happening. Which was really frustrating for the French.
More worrying was the fact that because they weren't firing they remained perfectly visible and as the French advanced they could see them just standing there waiting for them. The impression that you were making all this noise and effort and the enemy were taking no notice was very worrying, and began to make the French nervous. They realised that something wasn't right and as they got closer and closer without seeing any reaction they got more and more nervous. The shouting became louder but the men in the front rank began to worry about how close they were getting to the enemy and so the speed of the advance began to slow down as men began to fidget.
The impression began to form in the minds of the men at the front of the attack that at this short range when the British did begin to fire they were going to die very quickly. At a range of under 100 paces and still no movement from the enemy some of the men in the front ranks began to panic and would begin stopping to fire at the enemy, others would try to keep pushing forward. The column would begin to lose cohesion as men at the back pushed those in front of them and arguments would break out about whether to keep moving or stop. At this point the braver officers would run out ahead of the men and try to inspire them to keep moving.
Then at a range of about 50 paces the British finally reacted bringing their weapons from the order to the present.
This was the 'Oh!
moment' for the French who knew that at that range a fresh volley was going to be lethal. The column usually stopped dead even before the firing started as the men in front rank tried to push themselves backwards into the second rank or just stood mesmerised by their own imminent deaths. Then the British fired and all hell broke loose.
Contrary to the english myth the British did not fire a single volley. It was much worse than that, a single volley would have left the British with empty muskets and given the French a chance to recover (20 seconds), what the French describe is a rolling volley of fire which began in the enemies centre and then spread outwards to each flank, before beginning again in the centre. So, that they were flayed by a constant stream of lead that never stopped coming and piled men on top of men as they tried to reform and keep moving forward.
Some columns would stand like this for several minutes just being shot down as they tried to keep moving. But eventually they would give up and try to return the enemies fire often trying to expand their front to increase the number of muskets they could bring to bear.
But essentially at that point they had already failed to achieve option 2 and were trying to switch to using option 1, but at a major disadvantage in that they were already shaken and demoralised. Most men by this point were beginning to edge backwards trying to put some distance between them and the enemy, and preferable a few of their comrades too to provide them with a meat shield. The British bayonet charge would then be timed for the moment when they had had enough and were about to run.