LLoret de Mar is near Barcelona as I'm sure you know.
How you get there depends on how long you have and how you want to spend the time.
Quickest would be fly to BCN from Madrid and then get local bus or train.
Airlines as recommended by many people on this site are
Vueling and
Spanair and even
Iberia do cheap flights. Look on edreams.es for instance.
You could also take the train and take in some of the differing countyside between Madrid and BCN.
Train time tables on renfe.es and some tickets can be booked online.
Good luck with your trip.