Both ground and naval units require Food and Gold to sustain them. Before moving an army or fleet outside the city make sure to equip it with enough resources to sustain it. You can check how much time can an army or fleet sustain itself before running out of Food or Gold by clicking on it. Harsh and inhospitable terrain (deserts, high mountains etc...) will deplete the army resources much faster.
There must always be enough Food to feed the units or else they will starve. There can be up to 15% of the units dying if the army or fleet is starving. Starving can be avoided by givining enough Food to the commander before living the city. Food can also be acquired by defeating hostile armies or fleets. Starving also decreases the morale of the units.
Salaries must be paid for both ground and naval units or else they will start deserting and losing morale. Salaries are paid in Gold every two hours. Gold can also be acquired by defeating hostile armies or fleets.
Unit morale affects the performance of the army or fleet in battle. Units gain morale if they are inside a city and after a battle victory. They lose morale slowly over time if they are outside the city and faster if there is a Food or Gold shortage. Morale can also be raised by clicking the "Pay bonus salaries" and paying the cost which varies based on the size and unit composition of the army or fleet.