When we believed that Christ died for our sins, was buried, and rose again on the third day according to the Scriptures, we received the promise He gave when He told the disciples before His death that even though He was going away He would send another comforter.

in Whom also you, after hearing the Word of the Truth, the gospel of our salvation, in Whom also you believed, were sealed by the Holy Spirit of Promise – Ephesians 1:13

And I will ask the Father and He will give to you another comforter in order that He will remain with you into the age, the Spirit of the Truth, Who the world does not have the inherent ability to receive because it cannot watch Him, nor experientially know Him, but you experientially know Him because He remains alongside you and will be in you – John 14:17

Comforter is referring to someone that has been called alongside another. This can mean they comfort, encourage, or even advocate on behalf of another. The Holy Spirit was given to the Church to remind us of the truth and testify concerning Jesus Christ.

But when the Comforter comes, Who I will send to you from alongside the Father, the Spirit of the Truth, Who proceeds from alongside the Father, that One will testify concerning Me – John 15:26

But the Comforter, the Holy Spirit, Who the Father will send in My name, that One will teach you all things and bring all things to your remembrance, which things I said to you – John 14:26

It is through the reminding us of what was written that we have comfort and learn patience.

For as much as was written before hand, was written before hand for our teaching, in order that through the patience and through the encouragement of the writings we should have the hope. – Romans 15:4

And through the comfort that we can have a proper frame of mind, seeking to do the things that please God because we understand He is faithful and will do what He has promised.

And may the God of the patience and the encouragement, give to you the same frame of mind among one another according to Christ Jesus – Romans 15:5

So as we suffer for doing what is right, the comfort and encouragement from God abides in us, so we have a living Hope based upon a promise from a living God.

because just as we abound in suffering of the Christ unto us, thus through the Christ the comfort also abounds to us – 2 Corinthians 1:5

And do not despise when we are exhorted, for it shows that we truly belong to God

And do not let escape notice the encouragement, which to you as a son discerns, “My Son, do not think lightly (despise) child-training from the Lord, nor be discouraged by His rebuke. For whom the Lord loves He child-trains, and He scourges every son that He receives- Hebrews 12:5, 6

One of the aspects of our relationship with the Holy Spirit and how we experience Him is through His encouraging work that reminds us of what was written so that we have patience and are encouraged to continue to do what is right even in the face of persecution. So, when Scriptures come up in your mind in different situations throughout the day, or you recall what God has done for you in salvation and you belong to Him, remember who is doing that for you.