If you copy the formula you quoted into another row, or fill it down using Ctrl+D, it will automatically change the reference to the row you are copying/filling to. This is called a “relative reference”. If you use the formula
=PRODUCT($A$1:$B$1), this is called an “absolute reference”, which will not change if copied elsewhere.
You can also use the following formula in any row:
which will return the product of the two values in the row the formula is invoked.