How did Arjuna went to Swarga alive for getting weapons ?
When Pandavas were residing in Dvaitavana (द्वैतवन), Veda Vyasa visited them and suggested Yudhishthira that he should send Arjuna to Swarga to acquire the weapons.
He gave Pratismriti Vidya (प्रतिस्मृति विद्या) which will help Arjuna in his pursuit to Swarga Loka (विद्यां प्रतिस्मृतिं नाम प्रपन्नाय ब्रवीमि ते)
Yudhishthira learned this Pratismriti Vidya (प्रतिस्मृति विद्या) from Veda Vyasa and thought it to Arjuna. Arjuna using this knowledge went to Indrakila (इंद्रकील) mountains and met the Lord Indra.
Lord Indra suggested that Arjuna should first do Tapasya of Lord Shiva and than he should visit Swarga Loka. Based on Indra’s advice Arjuna did Tapasya of Lord Shiva. When Shiva came and met Arjuna, he suggested Arjuna to go to Swarga Loka. ( स्वर्गं गच्छेत्यनुज्ञातस्त्र्यम्बकेन तदार्जुनः ).
After Lord Shiva went, soon Devatas and Lokapala visited Arjuna at that mountain and gave him many weapons. In this meeting Lord Indra said to Arjuna:
रथो मातलिसंयुक्त आगतस्त्वत्कृते महीम्।
तत्र तेऽहंप्रदास्यामि सर्वाण्यस्त्राणि कौरव !! – Mahabharata Vana Parva 41.45
“Driven by Matali, a great chariot will soon visit you on earth and it will take you to Swarga Loka. I will give you all weapons there”
Arjuna went with the Mātali (मातलि), charioteer of Indra who took Arjuna to the Swarga Loka ( heaven )