It means to be fully sure about something before heading for it. You can apply this expression in all the fields.
Personally I've never used this expression. A very common synonym is the following:
"Piénsalo bien antes de tirarte a la piscina" o "Piénsalo tres veces antes de tirarte a la piscina"