Well, I initially took tests and got INTP, but later when I wanted to verify it I studied 2 and 3.
Through taking a test (MBTI-certified or not)
Through studying the cognitive processes (Fe, Ti, Se etc.)
Through reading type descriptions
A mixture of 1 & 2
A mixture of 1 & 3
A mixture of 2 & 3
A mixture of all three