That will depend on your country and usually is established in the law that regulates the commerce . But you question does not has a lot of science either. Imagine you start a company with 3 people. Each contributes with $500 dollars. When you start your company you guys decide it will be separated in lets say 1500 shares (you decide the ammount) So each share is valuated in $1. From there 1 thing will be decided. How many of the annual revenue you all will receive bases on total revenue, from there your part will be divided based on your ammount of shares. But 1 of your friends is indeed not working in the company, he is only a shareholder so he has not salary because of that nor operational decision.
Now, each one of you have a 33.3% of the company, all desicions must be made by the 3 of you in a vote. So you are not forced to work in your company, but no one can remove your shares. So what happened with Jobs was simple, he founded the company and because of that he was in charge of the company (as a worker), but at the same time he had shareholders (included himself) but more that 50% of the shareholders voted to fire him. This while retaining his shares of course.