You should always think about what to do in case something doesn't work out.
Some things may not go as planned. You have to keep in mind what to do in such a situation.
1. "You should always think about"=「常に~について考えるべきです」
"what to do in case something doesn't work out"=「何かがうまく行かない場合、どうするかを」
★"work out"=「解決する」、「~かが上手く行く」
2. "Some things may not go as planned"=「ある事は計画通りに進まないかもしれません。」
”You have to keep in mind"=「考えておかなければいけない」
"what to do in such a situation"=「そのような場合、どうすれば言いかを」