If you look at the KJV text carefully, you will notice that there are various names for Deity in the Old Testament, including "God," "GOD," "Lord," "LORD," or some combination of these terms.
Different words and spelling variations were used by the King James translators to designate the various Hebrew words for God. The three primary Hebrew words for God are Elohim, Jehovah (Yahweh), and Adonai.
Elohim. This is a general Hebrew name for Deity that designates God as our Creator and the object of all true worship. It occurs 2,570 times in the Old Testament (Jack B. Scott, s.v. "elohim," in Theological Wordbook of the Old Testament, 2 vols. Chicago: Moody Press, 1980, 1:44.). In most instances it is rendered "God" in the King James Bible, that is, with a capital "G" and with the letters "od" written in lower case.
Elohim is plural in form, however, when it refers to the true God, it designates only one Divine Being. We know this because it is consistently used with singular verbs, and with adjectives and pronouns in the singular, so that by the rules of Hebrew grammar it must be understood and translated as singular (Ibid.). Because Elohim is a general term for God, it is also used when describing false gods.
For instance, Exodus 20:2-3 declares: "I am the LORD thy God [Elohim] which have brought thee out of the land of Egypt . . . Thou shalt have no other gods [elohim] before me." Since the same word is used for the one true God and for false gods, the KJV translators simply used a capital "G "and made it singular when the context is speaking of the one true God, to prevent confusion.
Jehovah/Yahweh. This is the personal name of the God of the Bible and speaks of Him as the holy, self-existent God who hates sin but provides redemption. It is used 5,321 times in the Old Testament (J. Barton Payne, s.v. "Yahweh," in Theological Wordbook of the Old Testament, 1:210.). The Hebrew word Jehovah is written as "LORD" in the KJV Bible. Notice that all the letters are capitalized.
In some instances Jehovah is also written as GOD. Again, with all the letters capitalized. Wherever you see the words LORD or GOD in the Bible written in all uppercase letters, you will know that in every case it is the word Jehovah (or Yahweh, as modern scholars believe it should be pronounced) in the Hebrew text.
Adonai. This word means "Sovereign," or "Master," and emphasizes the Lordship of God. It is used more than 300 times in the Old Testament as a designation for God (Robert L. Alden, s.v. "adon," in Theological Wordbook of the Old Testament, 1:13.). It appears as "Lord" in the King James Bible. Notice that it is spelled with a capital "L" and lower case "ord." Like Elohim, Adonai is a special plural form. In this plural form it always refers to God (Ibid.). The singular form, Adon, is used to designate men who are lords over other people. There is a rare exception where a singular form for Lord (Adonai) is used for God.
Joshua 7:6-7 illustrates how the different names for God in the Hebrew text are coded into the King James Bible:
And Joshua rent his clothes, and fell to the earth upon his face before the ark of the LORD [Jehovah] until the eventide, he and the elders of Israel, and put dust upon their heads. And Joshua said, Alas, O Lord [Adonai] GOD [Jehovah], wherefore hast thou at all brought this people over Jordan, to deliver us into the hand of the Amorites, to destroy us? would to God [Elohim] we had been content, and dwelt on the other side of Jordan!