I attached a public bike station's Presta valve today - lost all the air in my tyre in the process and it got completely deflated.
I believe you mean to ask what is the best way to attach the presta valve to the pump.
All pumps are a little bit different. Some of them you insert and pull the lever up to lock the valve in place, some are the opposite, and you push the lever down. I have a compact pump that you screw into place, and on my air compressor, the presta valve doesn't lock into place at all, you just hold in on there. Some pumps have a shrader hole and a presta hole right next to each other. Some pumps are switchable and you have to take them apart to switch. There are quite possibly others out there that I've not encountered.
I'm sorry to hear about your mishap, but hang in there. It comes with practice, and we have all been there. To be honest, I was very put off by presta valves at first, because I was unfamiliar with them. I kept a shrader adapter on my valve for the first several months because I didn't know how to use the presta side of my pump.
Keep trying. If there is anyone at that particular bike station some other time, I suggest you ask them to show you. Who knows, maybe that pump is a particular pain in the rear.