it pays the bills = it means 'by means of this, I am able to earn a living.' is it right?
Yes. It's an expression that means "I earn money by doing this job." It describes a job that you don't really enjoy:
Henry: You worked at McDonald's when you were younger?
Peter: Yeah. It wasn't fun, but it paid the bills.
Henry: You worked at McDonald's when you were younger?
Peter: Yeah. It wasn't fun, but it paid the bills.