Now I want to describe the technique by which a person uses sanyama to cognize. This feature is described at the start of the chapter on super-normal powers, which is the third chapter in Patanjali's Yoga Sutras. There are several translations of this ancient vedic book.
According to Patanjali, you do three things at once:
Dharana -- this is the holding onto a thought, or a question from which you want to cognize an answer.
Dhyana -- this is meditation, or the flow of one's consciousness toward pure consciousness.
Samadhi -- this is the state of consciousness where one's mind, one's own personal consciousness, is totally and permanently absorbed in the field of bliss consciousness, the unified field of all the laws of nature, the field of consciousness that is completely unified with God. This is enlightenment, the first stage of which is called Cosmic Consciousness.
The question to which you want an answer has two parts, form and meaning. You transcend on the two together with sanyama, and then you witness the meaning. This is cognition.
But beware; even after you have been enlightened for three years, you can have cognitions that are partially false. This is because some deep desire that you have can color, can influence the truth of the cognition. To minimize this coloring, you have to send off your sanyama to God and then completely clear your mind and wait to see if God is willing to give an answer to you. Your cognitions are subject to God's Will, and sometimes God is not willing.