"runs-on" vs "container"

Ditto. I’d like to pass a file, or a variable, down from the action runner to the jobs, but I’m confused on the difference of runs-on vs container.