What is the meaning of 1 Corinthians 12:4-11?

4 Now there are diversities of gifts, but the same Spirit.5 And there are differences of administrations, but the same Lord.6 And there are diversities of operations, but it is the same God which worketh all in all.7 But the manifestation of the Spirit is given to every man to profit withal. 8 For to one is given by the Spirit the word of wisdom; to another the word of knowledge by the same Spirit; 9 To another faith by the same Spirit; to another the gifts of healing by the same Spirit; 10To another the working of miracles; to another prophecy; to another discerning of spirits; to another divers kinds of tongues; to another the interpretation of tongues: 11 But all these worketh that one and the selfsame Spirit, dividing to every man severally as he will. (1 Corinthians 12:4-11 KJV)

Thomas Scott

Verses 4-11: There was a great diversity in the spiritual gifts conferred on the Corinthians, and they valued some of them far more than others: yet these were all from the same divine Spirit; of whose operations they were but instruments and vehicles. There were also various different administrations or offices, in which men ministered to the benefit of the church, according to the work assigned, and the talents entrusted to them; but they were all the servants of Christ, and were dependent on the same Lord, and accountable to him. In the effects which followed the exercise of their gifts, whether in miraculous cures, or in the conversion of sinners; the whole was produced by the power of the same God, who wrought all these changes on the bodies and souls of men through his Son, and by his Spirit, for the gory of his own great name.

But the manifestation of the power and glory of the Spirit in these extraordinary operations, was not made for the credit of the man by whom he wrought, but for the advantage of the church, and even of those without; that the person who possessed these gifts, or filled up any office in the church, might profit others: for such gifts were entirely distinct from that gracious state of the heart, which disposes a man to improve his talents of every kind.

For the purpose of thus profiting others, the Holy Spirit conferred on one “the word of wisdom;” by which may be intended such immediate discoveries of the grand scheme of salvation, attended with such powers of discoursing about it, as were suited to render other men “wise unto salvation.” To another, the same Spirit gave “the word of knowledge;” by which an exact and extraordinary understanding of the Old Testament types and prophecies, and a capacity of explaining difficult subjects, of answering objections, of determining cases of conscience, or of speaking suitable words to different descriptions of persons, seems to be meant.

Another was endued with a remarkable degree of faith; which rendered him capable of engaging in very perilous services, for which persons of more exact knowledge might be less competent. This kind and degree of faith was distinct from that faith which justifieth; and so might be considered as a spiritual gift, bestowed on certain persons to enable them to profit others. Some were endued with the gift of performing miraculous cures: others were enabled to work miracles of divers kinds. Some predicted future events; others had a supernatural talent of discerning spirits, of perceiving by what principles men were actuated, or of what services they were capable. Some could speak in various languages which they had not learned; and others could miraculously interpret their words to the hearers who understood them not.

All these endowments the Holy Spirit freely bestowed, in that measure and diversity which  he saw good, and conducive to the common advantage of the church: so that no one had any ground of glorying over others, or of repining, as if he were forgotten in this distribution.—There is, indeed, much difficulty at present in determining precisely what the apostle meant by each of the terms here used, which doubtless were readily understood at the time when the gifts spoken of were exercised; but the sense which appeared most probable has been chosen, and great exactness on such a subject is not at all necessary.—Comparing the words in the sixth verse, “the same God which worketh all in all,” with those in the eleventh verse, “all these worketh that one and self-same Spirit, &c.” will make the reader fully sensible how conclusively this remarkable passage proves the Personality, Sovereignty, and Deity of the Holy Spirit.