Could I connect a landline phone line (rj11) to a computer, Thinkcentre m58p, that has an rj45, Ethernet, plug?

I would like to do this for internet (modem) connection. I do not know if the computer has a modem and this would work.

No, you need an external modem.

Depending on what internet service you get, that may be such as a DSL or cable one that connects to the computer via Ethernet, or (possibly, if anyone still provides the service), a dial-up modem that works from any phone line.

NO. If you connect a Land Line telephone to the RJ45 Ethernet port on a computer the Line Voltage and Ring Voltage will Blow up the Ethernet Adapter.
Computers no longer have built in Modems. There were used for Dial Up and these computers had a RJ12 telephone Jack. No more.
You need an EXTERNAL Modem and good luck in finding Dial Up provider.