A dividend is the distribution of a listed company's earnings to its shareholders. As long as you hold shares of the listed company before the market close of the ex-dividend date, you are eligible to receive a dividend.
On the ex-dividend date, the stock price of the listed company will fall, so the shareholders will find a loss in their P/L before the market opens. The amount of this loss will be converted into a cash dividend and distributed to the shareholders' accounts.
When a dividend payout occurs, your position changes from the value being all shares, to a new equivalent value of shares and a cash dividend. The cash dividend will be credited into your account on the ex-dividend date.
A special dividend is a kind of distribution for some special reasons, such as when the listed company makes money from its investments, instead of from its main business activities.