Both the terms stockholder and shareholder refer to the owner of shares in a company, which means that they are part-owners of a business. Thus, both terms mean the same thing, and you can use either one when referring to company ownership.
To delve into the underlying meaning of the terms, "stockholder" technically means the holder of stock, which can be construed as inventory, rather than shares. Conversely, "shareholder" means the holder of a share, which can only mean an equity share in a business. Thus, if you want to be picky, "shareholder" may be the more technically accurate term, since it only refers to company ownership.
The rights of a stockholder or shareholder are the same, which are to vote for directors, be issued dividends, and be issued a share of any residual assets upon liquidation of a company. There is also a right to sell any shares owned, but this assumes the presence of a buyer, which can be difficult when the market is minimal or the shares are restricted. Also, a stockholder or shareholder can be either an individual or a business entity, such as another corporation or a trust.