The “Spirit of Christ,” which Mormon tells us “is given to every man, that he may know good from evil” (Moroni 7:16), is not the same as the Holy Ghost. The difference between the Spirit of Christ and the Holy Ghost has been explained by Joseph F. Smith as follows:
The question is often asked, is there any difference between the Spirit of the Lord and the Holy Ghost? … The Holy Ghost is a personage in the Godhead, and is not that which lighteth every man that comes into the world. It is the Spirit of God which proceeds through Christ to the world, that enlightens every man that comes into the world, and that strives with the children of men, and will continue to strive with them, until it brings them to a knowledge of the truth and the possession of the greater light and testimony of the Holy Ghost. (Improvement Era 11:381-82. Also Latter-day Prophets Speak, p. 287.)
If a person is obedient to the commandments of God, however, it is possible for the Holy Ghost also to be with him as a “comforter within.” This idea has been expressed as follows by President Wilford Woodruff:
The Holy Ghost … is different from the common Spirit of God, which we are told lighteth every man that cometh into the world. The Holy Ghost is only given to men through their obedience to the Gospel of Christ; and every man who receives that Spirit has a comforter within—a leader to dictate and guide him. This Spirit reveals, day by day, to every man who has faith, those things which are for his benefit. As Job said, “There is a spirit in man and the inspiration of the Almighty giveth it understanding.” It is this inspiration of God to His children in every age of the world that is one of the necessary gifts to sustain man and enable him to walk by faith, and to go forth and obey all the dictations and commandments and revelations which God gives to His children to guide and direct them in life. (Journal of Discourses 13:157. Also Latter-day Prophets Speak, pp. 287-88.)