Back in my school days I knew a couple of guys in the grade ahead of me that were friends with each other. G was a great guy that hailed from cowboy country. He was outgoing and was friendly even to kids like me that were younger. G was generally pretty good, but it wasn't unheard of for him to be involved in some of the standard teenage mischief that went on.
T was also a great guy. I don't know anyone that didn't like him. Unlike G, he was quiet. But he was no wallflower. From the time I knew him back in elementary school, it was apparent that T was a genuinely good soul. He seemed to be naturally free of guile. Without the slightest hint of self righteousness, he was the kind of guy that was incompatible with mischief. It simply was not in his nature.
In speaking with G recently, I discovered that he and T have remained close friends throughout their adult lives. When I commented about my impression of T as being without guile, G told me something that resonated well with me.
T, said G, was (and still is) like the Holy Ghost. When their group of friends would cook up something that might involve a hint of rascality, T didn't make a big deal out of it or seem prudish; he just didn't show up. When the time came to let down their hair, T was nowhere to be found.
Since T was a quiet guy, G and his group of friends would sometimes not even miss T during these types of activities. Occasionally someone would notice and would wonder why T was not in attendance. In hindsight, G realized that T was not in attendance whenever a planned activity was inconsistent with T's character.
After a while, G decided that he wanted to do everything he could to spend more time with T. G wanted to engage in activities that were consistent with T's nature because he always felt good and right when he did so. G noticed that things just naturally turned out better when he followed this pattern.
The Holy Ghost works similarly. He is quiet and unobtrusive. He may almost go unnoticed, but we tend feel good and right when he is around. When we determine to engage in activities that are inconsistent with divine nature, the Holy Ghost won't make a fuss about it; he simply won't show up. We will engage in those activities without the benefit of his company.
Those that have made covenants with God to be willing to take upon themselves the name of Christ, keep his commandments, and always remember him are promised the constant companionship of the Holy Ghost (see Moroni 4:3, 5:2). This is one of God's greatest gifts to us (see Gospel Principles chapter 21, scroll to One of God's Greatest Gifts).
But we can turn away this gift if we choose thoughts or actions that are inconsistent with the character of the Holy Spirit. As your truest friend, the Holy Ghost will gladly (but quietly) accompany you whenever you let him.
How much do you want the Holy Ghost to spend time with you? The choice is up to you.