The qualifications were that you would be able to boil water.
No, really -- ship's cooks were essentially men who prepared oatmeal, puddings, salt meat and dried vegetables by boiling them; each mess of men (the eight or so men who would eat together) would do any fine work after that.
The position was often offered to men who had been wounded in battle as a bit of a sinecure, as it wasn't a job that required going aloft. Cooks were classified among the ship's "idlers," that is the men who worked all day rather than standing watches on and off.
You may be confusing a ship's cook with a steward or servant that the officer's mess may have employed -- for meals in the wardroom or great cabin, the captain's or officer's servants might be expected to do some cooking, or someone with culinary experience might have been retained for the job, but they were not "civilian" jobs.
I wrote a lot more about victualing and rations here, if it's of interest.