Navy MA: The MAs are the ship's Captain's sailors who provide guard duty aboard the ship, maintain the ship's brig, and escorts prisoners from the ship to shore correctional facilities. At times, they may perform the duties of shore patrol while the ship is in foreign ports. Note that the MAs are not Shore Patrol ratings (SPs perform similar functions as Marine MPs - gate guards, traffic control, riot control, etc).
Onboard aircraft carriers, the Marine Security Guard detachment performs most of the duties of the MAs; however, the ship's MAs assist the Marine Security Guard detachment as required or assigned by the ship's CO or XO. During a port of call many years ago as a senior Marine 1stLt, I was assigned as the Shore Patrol officer with a Chief and PO-1 MAs to assist me. Our job was to grab any sailor or Marine who was misbehaving and put them in the Patty Wagon (yep, that was what it is called) so that they can be taken back to the ship before they caused trouble with the local populance. The Marine Security Guard remained aboard ship and provided security of the ship itself to prevent anyone from sneaking aboard who were not allowed to be there. For non-aircraft carrier ships that did not have Marine Security detachments, the MAs did the same duties.
Marine MPs are land "police" who perform guard duty at the main gates of Marine Bases and some Naval installations. They also perform roving patrol as part of their guard duties, traffic control to include issuance of traffic citations, ID checkers to control access to classified areas, and patrol local towns, US and overseas, to ensure wayward Marines are returned to base before they cause trouble in the local town. The Navy SPs have same identical duties.
If you are tyring to decide which you want to do, the two jobs are as different as apples and green beans. One is Navy and located aboard ships at sea majority of time and other is land based. Note that all Naval stations also have MAs and are responsive to the commanding officer since a Naval base is considered by the Navy to essentially be operated the same as a ship at sea.
Lieutenant Colonel, US Marine Corps-Retired
Been aboard aircraft carriers, naval stations, Marine Corps bases and air stations, and very familar with the responsibilities of MAs, SPs, and MPs.