A common point of confusion is when to use að hafa, að vera með and að eiga, as all three can be translated into English as to have. There is in fact a relatively simple delineation between the three, though as with all things language there is some overlap or gray areas. Do not be surprised if you hear native speakers “breaking” these “rules”, particularly in regards to hafa and vera með.
Að hafa is the most direct translation of to have. In general, að hafa is used for abstract things, such as time, power, worries, capacity or talent.
Að vera með is a phrasal verb (a verb plus another word or two, with a meaning different from the original verb) which often translates as to have. It is used to indicate either posession (but not necessarily ownership) of physical things, such as a computer, a car or a person; or having illness, disorder, or disability, such as the common cold, dyslexia or multiple sclerosis. The difference between ownership and possession is the difference between what is yours versus what you have on you.
Note that að vera með takes the accusative case if it is supposed to mean to have. If the dative case is used it translates as to be with.
Að eiga directly translates as to own, as it indicates ownership (but not necessarily possession) of physical things. In addition, it is used for people - you own your family and friends. Recall that the difference between ownership and possession is the difference between what is yours versus what you have on you.
The different uses of hafa, vera með and eiga are summarised in this chart.