"But the anointing which you have received from Him abides in you, and you do not need that anyone teach you; but as the same anointing teaches you concerning all things, and is true, and is not a lie, and just as it has taught you, you will[a] abide in Him." 1 John 2:27
The Holy Spirit comes upon those who are sincere to be guided according to His will, so that they may not be taught by deceiving spirits. This is the anointing that teaches.