Military payday was held twice a month; on the 15th and the last day of the month (or the Friday before, if either of those days fell on a weekend).
In the days before direct deposit, there were three ways to be paid.
The first was by allotment. A sailor could designate all or part of his pay to be paid somewhere else, whether by deposit into a bank account or by a check which was written by the Navy's pay system in some godforsaken place like Memphis or Cleveland and which was mailed out from there.
The balance of the pay would be paid by check, cash, or a combination thereof. Several days before payday, payroll lists would be posted in spaces throughout the ship. The officers' pay list was usually posted on a bulletin board outside of the wardroom, the chief petty officers' pay list was posted in the Goat Locker, and the pay lists for divisions and departments were posted in their spaces. You would sign the list and indicate if you wanted any or all of it by check.
If the ship was in port, prior to payday, the disbursing officer and the disbursing clerk would go to the bank and draw enough cash to cover payday. "Enough cash" was $40,000 or more for a frigate, $60,000 or more for a cruiser. Ships that deployed went with a lot of cash, but most of it was recycled on board as ship's company would get money orders at the ship's post office to send funds home or they'd buy stuff in the ship's store.
Payday would commence at specific times in the day. The disbursing officer and the clerk would set up shop on the mess decks, in the wardroom and in the Chief's mess at those times. Everyone would line up, sign the pay list and get paid. The default method of payment was cash.
If you missed the line, you had to make alternate arrangements. Normally if you missed payday, the disbursing office would cut you a check and then hold it for pickup. They'd even cash it for you, unless you had pissed them off.
Sailors could wind up with a lot of money over a long cruise if they were frugal and if they didn't have it sent by allotment to bank accounts. Some would keep the cash in their lockers. Others would take most of their cash back to the disbursing office and have a check cut back to them, which was safer. The third method was to give a sealed envelope of cash to one's division officer and ask him (or her) to keep it in their stateroom safe, something that division officers really tried to discourage, as the safe was supposed to be used for storage of classified materials and special access keys.
Seems the captain of one ship decades ago had a wife who had no idea what he was paid; she had never seen a military pay scale and he was skimming several hundred dollars a month. He had ordered that the pay lists not be publicly posted, but kept in the disbursing office, to guard against his wife visiting the ship, as she frequently did in port, and seeing it.
The disbursing officer of that ship transferred out and a new one came in. The turnover did not overlap a military payday. The new ensign posted the pay lists throughout the ship, as he had learned to do in the Naval Supply School. The captain's wife came aboard that day and saw the pay list.
The captain sent the new disbursing officer ashore for "lack of confidence". The captain's wife filed for divorce.
 If the bank was on-base, the disbursing officer and the disbursing clerk went over with unloaded .45s. Ships in overhaul at civilian yards would send a security team, led by someone the captain trusted, and they'd have weapons which were fully loaded.
There was some way it was done when the ship visited foreign ports and the disbursing office would change money into pesetas, lira, francs, pounds, etc. I don't know how the cash for that was handled. Smart sailors did their money-exchanges on the ship, as the rates were more favorable than those at the banks or the "cambio shops" ashore.