Some companies have negotiated contracts with all three of the listed unions; Maersk Lines U.S. flag operation is an example..
Masters, Mate and Pilots [MM&P] represents only deck officers. The Marine Engineers Beneficial Association [MEBA] represents engineering officers, although they do have a few contracts where they provide both deck and engine officers. The American Maritime Officers [AMO] represents both deck and engine officers. Senior Officers (Captain, Chief Mate, Chief Engineer and 1st Assistant Engineer) are union members, but are usually permanent company employees also; although there can be hiring lists like MM&P's company 'select list' or 'preferred list' for Chief Mates. The junior officers (2nd and 3rd Mates/Assistants) are normally 'casual' or 'off the board' employees. Those jobs are rotary in nature and, at least for the MM&P, are for periods of up to 120 days. A member who successfully bids for a job will be aboard for the length of time the job was dispatched for. At the end of that time the job will again be posted on the union hall board and they will be relieved by another union member. All shipping for rotary jobs is based on seniority and time on the beach since your last employment. In other words, how senior your book is (A, B, C, D or applicant in the MM&P or Group 1, 2 or 3 in the MEBA) and how old your shipping card is. The age of your card is basically the time since your last day of employment on your last ship. In the MM&P shipping cards are good for 1 year, then they expire (or 'roll over' as they say) and you have to re-register. I'm not sure how long the MEBA cards are good for, but I think it's 9 months. Advancing your book (at least for the MM&P and MEBA) is a long process that requires accumulating sea time, paying up initiation fees and in some cases providing the union with letters of recommendation from senior officers you have sailed with.
I'm not real familiar with the AMO, except that I know they don't ship their jobs out of their union halls; but ship jobs using some form of phone dispatching system.
Shipping out of MM&P or MEBA can be tough. MM&P Applicants and MEBA Group 3 members can sit around the hall for months before getting an offshore job. Sometimes you can scrape by doing night port relief (night mate/night engineer) work until something comes up, but it can be discouraging.. right now it's a little better for the engineers than the mates.
You can get more information on the unions tankercaptain listed by visiting their websites linked below.
MM&P -
http://bridgedeck.org/
MEBA -
http://mebaunion.org/MEBA/
AMO -
http://www.amo-union.org/