Just like real life, you'll need to eat and drink to maintain your health.
You can check the status of your health, hunger and thirst on your HUD by the indicators on your screen.
Starving & Dehydration
If your hunger and thirst gets down too low you will begin to hurt (downing your health), while you won't die, your health will be severely impacted meaning small amounts of damage may kill you.
Check out the guide on how to eat & drink to replenish your hunger & thirst.