First of all you need a Cooking Pot or Autopot. You got a Cooking Pot when you start. If you lost it you might find another one in a shop for around 400 gp or you can buy one from other players. An Autopot will cost you around 5000 gp.
You need to be near a kitchen to be able to cook. This can be at an inn, your house, or a vacant property. There are many different recipes you can make and cooking is a good way to make some money and earn some XP.
As many items, the Cooking Pot can be used up.