As for your phone, it communicates with the rest of the Internet wirelessly, i.e. by sending and receiving electromagnetic waves through the air. The details depend on whether your phone is using mobile data or WiFi. Your phone gets connected to the Internet because it has the required hardware (wireless transceiver, embedded computer), software (web browser (e.g. Firefox, Chrome 🤮), operating system (e.g. Android)), configuration (set to connect to a network), and credentials (WiFi password if needed, WiFi network name).
Actually, the Internet does not mean wires. It is the global computer network that uses the Internet protocol suite to communicate. The medium of the connection (e.g., wireless, copper wires, fiber optic, etc.) is mostly irrelevant.
As for your phone, it communicates with the rest of the Internet wirelessly, i.e. by sending and receiving electromagnetic waves through the air. The details depend on whether your phone is using mobile data or WiFi. Your phone gets connected to the Internet because it has the required hardware (wireless transceiver, embedded computer), software (web browser (e.g. Firefox, Chrome 🤮), operating system (e.g. Android)), configuration (set to connect to a network), and credentials (WiFi password if needed, WiFi network name).