Quick answer
Ь (soft sign) softens the consonant in front of it. Ъ (hard sign) keeps a gap before е, ё, ю, я. Neither is ever pronounced on its own.
’
How to say it
To soften a consonant, say it with your tongue pressed towards the roof of your mouth, as if a tiny “y” were coming next.
It changes the word
брат is a brother, брать is to take. Мат is checkmate, мать is mother. The soft sign is not decoration — it is the difference.
The hard sign is rare
Ъ appears in about a dozen common words, almost always after a prefix: подъе́зд, объясни́ть, съесть. It tells you to restart the vowel instead of gliding into it.
Gender clue
A noun ending in -ь can be masculine or feminine, and you have to learn which: слова́рь (m.), ночь (f.). Most abstract nouns in -ь are feminine.
Typical mistakes
Ignoring the soft sign entirely
день ≠ ден
It is audible to Russians even when it is invisible to you.
Treating -ь nouns as one gender
learn each one
слова́рь is masculine, ночь feminine — the ending alone does not tell you.
Check yourself
Which word contains Ь?