It's a topic that comes up once in a while, usually when it's less relevant to the point being made. The short story [0] is that it can mean both literally or figuratively depending on if you use it literally or figuratively.
> We define literally in two senses:
> 1) in a literal sense or manner : actually
> 2) in effect : virtually
[0] https://www.merriam-webster.com/grammar/misuse-of-literally