Hay vs estar
Introduce what is there. Then say where it is.
The short answer
Hay introduces the existence or availability of something. Estar locates a particular person or thing. Compare Hay una farmacia cerca, “There is a pharmacy nearby”, with La farmacia está cerca, “The pharmacy is nearby”. The choice depends on what you are telling the listener.
hay
Something exists
Introduce an available or previously unidentified thing.
Hay una farmacia cerca.
There is a pharmacy nearby.
está / están
Something is in a place
Locate the person or thing you have in mind.
La farmacia está cerca.
The pharmacy is nearby.
One scene, two different questions

What is on the table? Where are the keys? Complete each answer with hay or the correct form of estar.
___ dos llaves en la mesa.
Las llaves ___ al lado del libro.
Show example answers
Hay dos llaves en la mesa.
There are two keys on the table.
Las llaves están al lado del libro.
The keys are next to the book.
Hay introduces two keys. Están locates the keys we already know about; it is plural because las llaves is plural.
Let the information develop through a conversation
A visitor may first ask whether there is a café. Once the café has been identified, the conversation can locate it. The real place has not changed; the job of the sentence has.
¿Hay una cafetería cerca?
Is there a café nearby?
You ask whether a suitable place exists.
La cafetería está junto a la estación.
The café is next to the station.
Now you are locating an identified café.
Plural nouns affect the two patterns differently
Existential hay keeps the same form with one or several things. Estar agrees with the subject, giving está for a singular thing and están for plural things. Practice the complete message rather than choosing a verb from the noun alone.
Hay dos llaves en la mesa.
There are two keys on the table.
The number does not change hay.
Mis llaves están en la mesa.
My keys are on the table.
Mis llaves identifies the keys; plural location uses están.
Try it yourself
Choose the word or verb form that fits the situation. Say the complete sentence before checking your answer.
Introduce the existence of a nearby pharmacy. Capitalise the first word.
___ una farmacia cerca.
Check answer 1
Hay una farmacia cerca.
Hay introduces something that exists nearby.
Locate the pharmacy you have already discussed.
La farmacia ___ junto al banco.
Check answer 2
La farmacia está junto al banco.
The identified pharmacy has a location, so use está.
Locate your keys, using estar.
Mis llaves ___ en la mesa.
Check answer 3
Mis llaves están en la mesa.
The subject mis llaves is plural, so choose están.
Make it your own
Describe two things in a room with hay. Then pick one of them and tell someone exactly where it is with estar.
Grammar references
For further detail, see these Spanish-language dictionary and usage entries. Examples and practice questions above are written for this guide.