Claudia,
Joe has answered your other question but I forgot to mention something.
You can buy your train tickets from Malpensa to Milano Centrale at the airport. I’m not 100% sure if you can also buy your tickets to Varenna at the airport or you may have to get them at Milano Centrale.
Either way, you will need to validate (date/ time) stamp these tickets prior to boarding the Malpensa Express train, and the Regionale train to Varenna, to avoid hefty fines.
Happy travels!
Edited to add...
One more thing, try to sit on the left side of the train on your way to Varenna for better views of the lake. The train journey will be a bit over an hour, and the train stops very briefly (1 - 2 minutes) once it arrives to Varenna. Make sure to get your stuff and be ready to disembark
when the train stops- you’ll see others doing the same.
There’s a tiny unmanned station in Varenna.
When you get off the train, you walk down to the ferry dock. Check google maps ( street view) to get a better idea.
When we visited Varenna we took a taxi to our hotel.
During your visit, do go back to Varenna and walk along the beautiful lakeside promenade, (left of the ferry dock when facing the lake) and enjoy a gelato at Gelateria Riva!
Enjoy!