I want a hot dog and an hamburger.

1. It's $6, isn't it?
2. They are $6, aren't they?

Which one is correct? Are both OK? Then what is the meaning of 'it' in #1?

1. The "it" would refer to the price.(singular)

2. The "they" would refer to the foods.
(plural)

So, both are ok.

A minor correction --

I want a hot dog and A hamburger.

We in the U.S. pronounce the "h" in hamburger, so we'd use "a" not "an" before this word.

Both sentences are grammatically correct, but they have slightly different meanings.

In sentence 1, "It's $6, isn't it?", the word "it" refers to the total cost of the hot dog and the hamburger combined. So, the person is asking if the total cost of both items is $6.

In sentence 2, "They are $6, aren't they?", the word "they" refers to the individual items, separately. So, the person is asking if each of the items, the hot dog and the hamburger, cost $6 individually.

So, if you want to inquire about the total cost of both items, you should use sentence 1. If you want to ask about the cost of each item separately, you should use sentence 2.