Recently, I've heard people say the Holy Spirit put words in their mind. Usually, the words they are referring to are a Bible verse. How can a person know if the words are from the Holy Spirit or something that their human mind generated? Additionally, some people claim that God "lays" something on their heart. How can a person decipher these thoughts and feelings as being from God or generated in the human mind?
Considering what the Bible teaches about the work of the Holy Spirit, we may not have to wrestle too much over your first question. The Bible teaches that God’s word is “alive and active” (Hebrews 4:12). The Holy Spirit works through the gospel—the word alone or the word connected to water in Baptism—to fill hearts with saving faith. Then, the Holy Spirit dwells within Christians (Romans 8:9-11; 1 Corinthians 3:16). As Christians, our new self delights in God’s word (Psalm 1:2). When we use God’s word and impress its truths on our hearts (Deuteronomy 6:6-9), it is no surprise that the Holy Spirit is at work in our hearts and minds (Romans 8:16). That work can certainly include leading us to recall Bible verses and biblical truths.
With your second question, you would want to ask people what they mean by God “laying something on their heart.” It could be a matter of seeing an opportunity to help someone and then thinking of Galatians 6:10 – “Therefore, as we have opportunity, let us do good to all people, especially to those who belong to the family of believers.” Or it could be a conscience that awakens (Romans 2:15). Again, you would want to ask people to explain what they mean by that expression.