As a DM, my favourite part is the worldbuilding. I love figuring out how the setting works, what its history is and who the prominent people are. I do worldbuilding as a solitary activity sometimes, but having an audience makes it better and having a participatory audience is best. I ran a year-long campaign I called the "zero-prep campaign" where I didn't do much or any preparation ahead of each session, letting the party's decisions guide things and frantically filling in the universe around them as they went, and I managed to produce one of my most cohesive and fun settings yet.
As a player, it's similar but much smaller scale - I focus on building my character. I try to settle in to his or her skin, get to know them, figure out what they think about and how they'd react to various situations. The character is on a road I don't know the ultimate destination for and I am keen to find out.