"At a store"
It's not strict and it's hard to describe because it's mostly about speaking nicely and you may decide on your own what sounds better in certain cases. But some common recommendations are like these: 1) Start a sentence (or part of it after a stop marked with ‘, ; : – …’) with ‘у’ before a consonant; 2) Start a sentence with ‘в’ before a vowel; 3) Between consonants use ‘у’: ‘ходив учора’ and between vowels use ‘в’: ‘у нього в очах’. But!!! there are words that don't allow ‘у/в’ alternation (влада, увага), some even may change their meaning (вступ/уступ) — this you have to check up in a dictionary; 4) ‘У’ before ‘в, ф, льв, св, тв, хв etc’ despite the ending of the previous word, but ‘в’ after a vowel no matter what combination follows it, if it's not ‘в, ф, льв, св, тв, хв etc’; 5) In proper names leave it as it is. It's quite easy isn't it? :)