From Barcelona Airport

 By train: At the airport Terminal 2 (T2) you can find the train station. Schedules:

www.20gencat.cat/portal/site/rodalies

Other options, if you loose the last train you can consult the bus schedules:

www.barcelona-tourist-guide.com/es/aeropuerto/transporte/aerobus-en-el-aeropuerto-de-barcelona.html

From Girona Airport

You have to go to Girona Airport to Bus Station in Girona city. Consult the schedules:

www.barcelonabus.com

By train to Arenys de Mar. Consult the schedules:

www.20gencat.cat/portal/site/rodalies

By bus to Arenys de Mar. Consult the schedules;

www.barcelonabus.com