bus from central Malaga to La Linea shown on here
http://www.gomarbella.com/costadelsolbuses/la- lineabus.pdf
4 per day, journey 3hr.
Best train journey is Malaga to San Roque, 3h50-4h30, by changing at Bobadilla (trains at 07h40, 14h05 & 16h35), San Roque to La Linea by bus every 30mn, journey 30mn.
Both options require you to get to central Malaga, refer to
http://www.aena.es/csee/Satellite?Language=EN_ GB&pagename=subHome&MO=1&SMO=1&SiteName=AGP&c= Page&cid=1048858947201 for options.