<s>[INST] How many four-digit integers are there that contain exactly one $8$? My book gives:
$$1 \times 9 \times 9 \times 9 + 3 \times 8 \times 9 \times 9 = 2673$$ integers
I don't understand where the $3$ comes from in the second part. 
I understand the first part, $1 \times 9 \times 9 \times 9$. I believe it's saying we have $1$ choice to put $8$ in the beginning, $9$ choices of $\{0\} + \{1,2,3,4,5,6,7,9\}$ for the remaining three positions. 
 [/INST] You made a good start. Indeed, if you fix the first spot as $8$, the second, third and fourth spot can be filled with any digit in $\{0,1,2,3,4,5,6,7,9\}$, hence you have $9^3$ possible choices. 
It remains to count how many number you could have when the first spot is not $8$. Notice that, as Peter suggests above, usually the first digit is supposed to be not zero. 
Fix the second spot to be $8$. Then you have only $8$ possible choices for the first digit, infact you can choose any number in $\{1,2,3,4,5,6,7,9\}$. The third and fourth spot can be filled with any number different to $8$, that is any number in $\{0,1,2,3,4,5,6,7,9\}$. Thus you have $8\times 9^2$ choices fixing the second spot to be $8$. The same reasoning can be done also when you fix the third spot to be $8$ and when you fix the fourth spot to be $8$. In other words, when the first spot in not $8$ you have $8\times 9^2 + 8\times 9^2+8\times 9^2=3\times 8\times 9^2$ possible choices.
Hence the total amount is $9^3+3\times 8\times 9^2$ numbers.
</s>