Which option is correct?

Can you tell which option is correct? And why it is necessary to use or not to use this or that article?

I have pizza.

or

I have a pizza.


They are actually both correct. I will list two scenarios, one for each one, to show how they are correct.

1.

Bob: I'm so hungry! Does anyone have food?
Bobby: I have pizza.

2.

Bob: Finally, it's lunch time. Guess what I have?
Bobby: I don't know, what do you have? A sandwich?
Bob: I have a pizza!
Bobby: Ooh lucky!

As you can see, they both make sense in each scenario, and if you put on in the other scenario, they will still work. It's a matter of what you mean. I have a pizza means that you have one pizza. I have pizza means you have pizza. One is more specific than the other.

Hope this helps!