You can get the ferry from Gibraltar to Morocco Tangiers which take around an hour and a half. There are also several local tour companies who offer day trips to Morocco, which include guided tours.
Tarifa, the most southerly point in Europe, is around a 45 min drive away. You can catch the bus from Algeciras, which is just ten min away, just over the border and around the Bay of Gibraltar. There is a regular local bus service to Algeciras from La Linea bus station, which is around a five min walk from the border. Just follow the signs!