Does the LM317 take ANY voltage and convert it into the adjusted one?
The 317's valid input voltage range is from a minimum of 3 V above its programmed output, to a maximum of 40 V (32 V for some types).
Within that range, it will provide approximately the programmed voltage on its output, as long as ...

its power dissipation is low enough for the heatsink you're using with it to keep its temperature within specification.
the output current being taken is within specification
you have input and output capacitors to keep it stable

Rapid variations in the input supply, like ripple on the reservoir capacitor after a rectifier, will be suppressed to some extent at the output. Ripple from low frequencies to 10 kHz will typically be reduced by at least 60dB (a factor of 1000) at the output. Above 10 kHz, the 317 runs out of gain and the suppression reduces.
Input ripple has another effect worth considering as well. Let's say you have 2 V peak to peak ripple on your input, say it's swinging between 9 V and 11 V as your rectifier-fed storage capacitors charge and discharge. Your DMM will read the average DC voltage of 10 V. That 3 V minimum voltage across the 317 needs to be maintained at all times, including the input troughs, so you can only safely supply 6 V output, not 7 V based on your meter reading.