You should read up on some options math and how implied volatility is calculated.
For maturity, its really easy. Do you think the stock will rally above the strike+premium. If not, then sell the put. If so, then buy the call.
For before maturity, you need to understand the cost of time value...