The preference shares take preference over the companys' earnings for any dividend. i.e. If there is not enough earnings or profit to cover both the pref shares and the ordinary shares the pref shares are paid first and any leftover goes to the ordinary shares.
There are also cumulative preference shares which means the previous years unpaid pref dividends have to be paid before any ordinary dividends can be paid