they generally study books, remember theories, opening line, etc.
how do Grandmasters learn?

They have somebody special to tell them what to do. It takes time and hard work to master chess. You may never go there if you ever taken a wrong path.
Or, do you mean how they learn after they become GMs? I think they learn from their preparations for tournaments, and from tournament itself. But the real hard work is before they reach GM imo.
Thank you for responses. I meant after they become GM. I was curious what someone could possibly learn after they have become an expert in their field. Maybe most of their focus goes toward self-assessment and keeping up with theory.

There are "classes" of Grandmasters. Who say GMs have learnt everything there is to know about chess?? May be not directly related to chess, but there are many things that will affect chess performance (psychology, biology, etc).
And as long as human cannot solve chess, there is always something to learn about chess. Give them a random chess position, ask them who is winning. If they don't know for sure, then it is obvious that they still have something to learn.

i have a townmate whos nearing to achieve his grandmaster level by achieving and qualifying his ist norm to being grandmaster,officialy he is still international master as there are still other norms to add which i dont know. during his national masters days when he was still in our city,he has plenty of chessbooks and was very fond to solve puzzles,he played blitzgames so well that our time control was one minute against fiveminute. but after a year as we are expose to time control. he was begging for an additional 30 seconds as we learn to play blitz chess and familiarize with time control, since the mechanical clock has no time increment,i dont know how he adjust it one minute and 30 seconds as the pointer is the basis for time. one thing i can remember in him is i borrowed his encyclopedia of openings. he was fast also on analyzing on endings but for the middlegame he is most serious with his thoughts as i can see it with his eyes. during his college days,i remember him saying he spent 4 hours a day in different hours of the night and day.he is no 15 in the elo rated players of the philippines as the last time i track it down i am not updated as of now,he is not yet a full pledge grandmaster by lacking added norms but i have related something that might answer your topic., for the meantime.
Does anyone know how a GM learns? They know so much about chess, or at least have an amazing ability to play it. What's left for them to learn or improve on? Are there GMs out there who have learnt everything there is to know about chess, with the exception of calculating even more moves ahead?