Below you can see a dramatic picture of Gibraltar and the Straits of Gibraltar behind on the right. This is Algeciras Bay and immediately across the bay is Algeciras Port where you can take a ferry to get across to Morocco. The big ships in the bay lie up there to avoid anchorage fees in Gibraltar or Algeciras. Some of them are oil tankers waiting to discharge their cargo at the oil refinery in Palmones just out of sight to the right.
Check through here for my suggestions on what to on a day's excursion to Gibraltar.
The border between La Linea and Gibraltar follows the green vegetation to the right of the runway. La Linea bus station is about 5 minutes walk on the Spanish side of the border along the road which crosses the runway. It is just out of the picture to the right.