When you love someone, you often want to spend all your time with that person, or at least a good bit of it. It's completely natural and understandable to feel this way. You crave their laughter, enjoy their company, and cherish the moments spent together no matter how they are spent. Loving people is a beautiful privilege we have as human beings.
Being with people is vital to both their growth and yours as well, but it's okay to be apart from them too.
The phrase "absence makes the heart grow fonder" was coined for a reason. Giving yourself and those you love some time without each other can be a good thing. No one is obligated to hang out all the time, every minute of every day. Take some time for you and give them some time to be alone as well.
That is one way to love people from a distance, to give them their own time. On the other hand, you may be required to love someone from a distance by putting actual space between the two of you. If a family member or friend is causing you constant pain and disappointment, then it is necessary to go the other way. You can still love them and you probably will, as love is not an emotion we can shut off as we please. But you have to love yourself too, and self-love includes letting go of toxic people.
The final way to love someone from a distance is when they are no longer on this Earth. This is the hardest form of separation I can imagine. In this case, time does not matter and neither does distance. Time is forever and distance is too far once they pass on. Still, your memories and heart for that person are still very much present. That is love.
Remember, it's okay to love people from a distance. Whether the gap is by time, space, or touch, there is nothing a massive dose of love can't fix... or at least begin to heal.