Holding positions in industry while being a professor I have seen many professors also hold positions in industry, say Data Scientist at Uber or Machine Learning Manager at Google. How does this work? Do professors apply for these positions or do the companies reach out to them? Also, I know some of these professors take a break from being at the university and go work full time for a while before coming back, while others split their time between both. I am just curious if anyone knows/experienced how this process works.
Many possibilities:

Sabbaticals,

leaves of absence,

some Universities have "close" contacts with industry and some faculty have combined teaching / research roles...

Some engineering Universities really value faculty who have actually done real work and students appreciate that as well. Nothing like having someone talk about sensors and issues with sensors like getting temperature readings from a brake disc that is glowing red while spinning at 10K rpm... Compared to those "academics" that only ever push paper...

Some Universities even "use" final year engineering students to do funded research (their final year project) for particular issues using University machines as they have helped purchase said machines etc