This verse is applicable to the Muslims during the time of Muhammad – historical Muslims – who were terrified of fighting in the battles to defend themselves because they were out numbered.
God bolstered their bravery by assuring them that they would be rewarded.