A woman usually ovulates 14 days before her next period, so if you have a regular 28 day cycle you should count the first day of your period as day one, so ovulation day will be day 14; if your cycle is longer than this, 32 days for example, you would ovulate on day 18.
After ovulation has taken place there is only a 24 hour window for the egg to become fertilized, but sperm can stay alive for up to seven days after sex, so if you definitely do not want to become pregnant, there are too many risks involved with having unprotected sex.
Naturally, if you have a cycle that is irregular, even by a day or two, then it is harder to predict when you may ovulate and so it is even riskier to have sex without using contraception.
It is also not unusual for women to ovulate earlier or later than at the 'usual' time, so this must be taken into account if you are trying to avoid pregnancy. Even though you may hear or read about a woman's fertile time, this is referring to the times when she is more likely to become pregnant and certainly does not rule out any other times.
A truly safe time to have unprotected sex (but only against pregnancy, not disease) is 24 hours after ovulation has taken place until your period starts, but you would have to know with absolute certainty when you ovulated for this to be successful.