If your organization believes that corrective action is needed then it expects to earn, or not to lose something.
First, state the objective of your corrective action: what you intend to earn or not to lose, some organizations also state the timing to meet the objective. Others, do not do it right away because they still have no clue about the root cause(s).
Second, collect data about the occurrence of the problem, like a doctor collecting symptoms. This step helps in reducing the scope of the challenge. For example, the challenge of reducing the number of defects becomes reducing the number of defects in the 2nd shift and products A and B. Organizations now can state the timing to meet the objective with much more reliability.
Third, develop some hypotheses about the probable cause(s), then, select the most interesting and test them, like a doctor sending you to do some blood analysis or other tests, when they have doubts about the source of your problem.
Fourth, develop a solution to eliminate the cause or its consequences, develop an action plan and implement it.
Fifth, check if your action plan was effective.
There is no fixed timing to close a corrective action, each case is a particular case.
The following material will provide you information about corrective actions: