I want to write some data (GPS) to a digital port on Arduino. As far as I understand sending data via a pin as if it were USB is possible. But I don't know what function to use. digital.Write doesn't expect any data or strings. How do I write serial data on to a digital pin
Using the arduino library "software Serial" (https://www.arduino.cc/en/Reference/SoftwareSerial) you can use any pin to write/read serial data.
The Aruduino Uno uses an ATmega328P which only has 1 hardware UART to help the software communicate serially with the outside world. If you are already using this hardware resource (for example through the normal Arduino serial library), it is unavailable to talk to a 2nd external device. In such a case you can emulate a UART in software using this Software Serial Library in exchange for some processor time (that is, using a software emulated serial port will slow down your program's execution).