An op-amp on its own has a gain of a hundred thousand or more, which is useless directly. Wrapping feedback around it throws almost all of that away in exchange for a gain you set precisely with two resistors, plus better linearity and a flatter response.
Choosing between the two
The non-inverting configuration has very high input impedance, because the signal goes straight to the op-amp’s own input pin. It cannot produce gain below 1. The inverting configuration can attenuate as well as amplify and makes summing several inputs trivial, but its input impedance is just Rin, which loads the source.
Gain-bandwidth product
The one specification that catches people out. An op-amp with a 1 MHz gain-bandwidth product gives a gain of 100 only up to 10 kHz, and a gain of 1000 only up to 1 kHz. If a stage sounds or measures dull at high frequency, check this before anything else. Splitting a gain of 1000 into two stages of about 32 each gives far more usable bandwidth.
Practical resistor choice
Only the ratio sets the gain, so pick the absolute values for other reasons. Keep Rf under roughly 1 MΩ, because input bias current flowing through a large feedback resistor creates an offset voltage, and large resistors are noisy. Keep Rin above a few hundred ohms so the previous stage is not asked to drive a near-short. Values in the 1 kΩ to 100 kΩ band suit most audio and sensor work.
Single supply operation
These formulas assume the op-amp can swing either side of zero. Running from a single rail, you must bias the input at mid-supply with a divider and couple the signal in through a capacitor, or the negative half of the waveform will simply be clipped off.