Subsequent to their miraculous escape from the house of lac in Varnavat, the Pandavas along with their mother Kunti ,roamed around/lived in the forests for a long period of time. One day, Arjuna had a very fierce encounter with a Gandharva in the forest,whom he defeated using Celestial weapons.The Gandharva gave each of the Pandava brothers a hundred steeds, born in the country of the Gandharvas.The Gandharva also gifted Arjuna the unique science of Chakshushi. What is Chakshushi? What are the details of the story?
Since you asked especially about Chakshushi Vidya, I am quoting only those slokas relevant about Chakshushi Vidya from Chaitraratha Parva of Adi Parva.
चाक्षुषी नाम विद्येयं यां सोमाय ददौ मनुः । ददौ स विश्वावसवे मम विश्वावसुर्ददौ ॥
The vidya called Chakshushi was given by Manu to Soma. Soma gave it Vishvavasu and Vishvavasu gave it to me.
यच्चक्षुषा द्रष्टुमिच्छेत् त्रिषु लोकेषु किंचन । तत् पश्येद् यादृशं चेच्छेत् तादृषं द्रष्टुमर्हति ॥
One can see whatever one want in whatever form one wants in all three worlds with this vidya.
एकपादेन षण्मासान् स्थितो विद्यां लभेदिमाम् । अनुनेप्याम्यहं विद्यां स्वयं तुभ्यं व्रतेऽकृते ॥
This vidya is to be obtained by standing on one leg for six months which I am giving to you without such necessity.
अर्जुन उवाच - यदि प्रीतेन मे दत्तं संशये जीवितस्य वा । विद्या धनं श्रुतं वापि न तद् गंधर्व रोचये॥
Arjuna Said: O Gandharva, If you are giving this Vidya,wealth and sastra even out of affection or fear of life, I will not accept such gift.
गंधर्व उवाच - संयोगो वै प्रीतिकरो महत्सु प्रतिदृश्यते । जीवितस्य प्रदानेन प्रीतो विद्यां ददामि ते ॥
त्वत्तोऽप्यहं ग्रहीक्ष्यामि अस्त्रमाग्नेयमुत्तमम् । तथैव योग्यं बीभत्सो चिराय भरतर्षभ ॥
Gandharva said: A meeting with Mahatma is ever a source of gratification; besides you have given me my life. Gratified with you, I will give you my Chakshushi Vidya. That the obligation, however, may not all be on one side, I will take from you, O Beebhatsa, your Agneyastra
अर्जुन उवाच - त्वत्तोऽस्त्रेण वृणोभ्यश्वान् संयोगः शाश्वतोऽस्तु नौ । सखे तद् ब्रूहि गन्धर्व युष्मभ्यो यद् भयं भवेत् ॥
Arjuna said: Okay, I will give you Agneyastra in exchange for the horses and let our friendship live long.
If you want to know the whole story you can refer here. So Arjuna only accepted the horses but not Chakshushi Vidya offered by Gandharva.
Hope this helps you.