costar vs valer
Both express price. Costar is what you pay. Valer is what something is worth. Valer also means 'to be okay'.
costar
To cost — and to be difficult or take effort.
¿Cuánto cuesta este abrigo?
How much does this coat cost?
The standard price question.
Me costó mucho esfuerzo.
It cost me a lot of effort.
Costar for effort, not just money.
Me cuesta levantarme temprano.
I find it hard to get up early.
Costar + infinitive = to find it difficult.
valer
To be worth, to be valid, to be acceptable.
¿Cuánto vale esta casa?
How much is this house worth?
Valuation, often large amounts.
Vale la pena intentarlo.
It's worth trying.
Valer la pena = to be worth it. Fixed phrase.
¡Vale!
OK! / Fine!
The single most common word in Spain for agreeing. Literally 'it's valid'.
Tricky bit
'Cuesta' and 'vale' overlap for prices, but 'cuánto cuesta' is the shop question. 'Cuánto vale' feels more appraisal-like. And 'valer' in Latin America is less used for 'okay', where 'ok' or 'dale' appear.