In Jim Cramer's long career of investing, he has learned that being in the woods is very strange indeed. Most of the time, investors think that they are either in the woods or out of the woods. However, he has been in this situation enough times to know that it typically only lasts for three days, and a prudent investor can come out unscathed.

"The reality is that you're always in the woods with stocks, it's just that the woods aren't necessarily as dark and scary as they often seem," the "Mad Money" host said.

When Cramer uses the term "the woods" he means times when the market seems as though it is really frightening. On Monday, for instance, the stock market seemed really scary. Talks with Greece totally broke down, the $70 billion Puerto Rican municipal bond market collapsed, and China had a huge decline, all in one day.

All of these events were startlingly negative for investors. However, Cramer pointed out that it is important to note who actually felt that negativity.

First, the real losers of the Greek situation, besides the people of Greece, were investors who held Greek bonds and Greek debt. Investors assumed that the Greek drama would lead to a collapse of Europe, so they sold off everything on Monday.

Helenecanada | E+ | Getty Images

However, there was no contagious collapse. It was clear to Cramer that the only ones who actually held Greek debt were people who had chosen to do so—central bankers and hedge funds that could afford the risk.

In fact, the euro actually went higher on Monday because people finally realized that the euro would actually be stronger without Greece.

"So the forced sellers we worried about on Monday never materialized, and those who sold everything realized they had reacted foolishly. I think they spent all day today buying back the stocks that they sold earlier in the week," Cramer said.

So, while all of the events that occurred on Monday were negative and shocking, they were really only scary to specific investors and no one else. But investors still created a big selloff because they were frightened.

Cramer knows that on day one, everything will go down because of the woods effect.

On day two, Tuesday, a clearing began to appear in the woods to provide opportunities. Investors realized that domestic retailers and bitoechs had absolutely nothing to do with Greece, China or Puerto Rico.

Then on day three, Wednesday, investors also realized that the scariest facets of their fears never materialized. On Monday, Greek Prime Minister Alexis Tsipras was ready to overthrow Europe with a call for referendum. But when he called for referendum, the Greek ATMs stopped working and the Greeks got scared. Now, all of a sudden, Tsipras is making nice again and no longer wants to overthrow Europe, so the market rallied.

The Puerto Ricans also recognized they may have overreacted and backtracked, and it also turned out that the Chinese government wouldn't allow its stock market to fall apart so quickly and cut rates.

Suddenly, the woods had some sunlight and buyers came back into the market, though Cramer was not crazy about the fact that the market opened up sharply higher on Wednesday.

This three-day pattern has repeated itself time and time again for Cramer since the bottom in 2009.

"So, here's my take: as much as I didn't want you to sell into the deep dark woods on Monday, I don't mind at all if you want to use today's strength to take something off the table now that everyone thinks we are out of the woods," Cramer said.

As long as you remain clearheaded in these situations, you will know when it is time to leave the woods entirely, when to stay, and when to buy. While you can still get hurt, you will recover faster than those who panic on day one, he said.