What is the discerning of spirits in 1 Cor. 12:10? What is the discerning of spirits in 1 Cor. 12:10? It seems that it is a bit different from the trying of spirits in 1 John 4:1 as there John gives a particular method as to how to try them and find out whether they are from God or not. Also, John seems to address every believer in his epistle, whereas in 1 Corinthians 12:10 Paul says that the gift of discerning spirits is given only to some believers (to "another").
The setting in 1 Cor 11-14 is the church gathered for worship. At such gatherings Paul expects participation from lots of people using spiritual endowments, given in that moment for the edification of the church.

However, there is a grave danger of people abusing those endowments for the attention and prestige. There is also a danger of "the flesh" lying, mimicking or at least misunderstanding what the Spirit is saying. All gifts are "in part".

Thus, in the context of 1 Cor 12, discerning of spirits seem to be a specific spiritual endowment to recognize by what spiritual inspiration somebody else is acting, what parts are of the flesh and what parts are of the Lord?

The context for 1 John is the early gnostic models of thought. Here it is a matter of recognizing the true Gospel and discarding the gnostic corrupt versions. Gnostics have a worldview that says everything true is 100 % spiritual and the physical world is by definition evil. Christ being truly incarnated (=in flesh) was something they denied. But in so doing they denied the Gospel, since it is Jesus dying "in the flesh" that brings salvation.

That also explains why it was so important for John to say (1:1f) that he had seen Jesus with his (physical) eyes and touched him also after the resurrection with his hands.

Off topic:

There is an interesting spinoff from this. Today media and bloggers or just about anyone will claim that the gnostic "gospels" (Thomas, Judas, etc) should be considered historic sources on par with the biblical gospels.

However, these pseudo-gospels never ever claim to be historic sources in the sense we are using the word today. John claims empirical knowledge of the risen Christ. He saw, he touched. That is exactly why his words were discarded by the gnostics! They claimed "spiritual revelation" - the senses are physical, evil and not to be trusted!

Gnosticism is as far removed from scientific knowledge as you can get, and claiming that gnostic sources should be counted on par with biblical gospels is patently absurd.

Disclaimer:

On a forum like this it is probably wise to tell from what tradition an answer is given. Especially on topics where even Bible believing Christians disagree. Had I had the time to expand my answer with proper exegesis and a comparison of different commentaries that would not have been necessary.

Although I have studied spiritual gifts using the Koine Greek text, nobody studies in an intellectual vacuum. Having read what many traditions have to say, I have found the the most sound exegesis exist in the writings of "empowered evangelicals" or in the writings of pentecostal scholars like Gordon Fee.