You can take money out of your account, at any time.
For a Roth IRA, there is no fee or penalty for withdrawing the contributions you make. However, investment earnings are subject to taxation and an additional penalty if taken out before you reach age 59½. There may be penalties if you withdraw your earnings before you've had your Roth IRA for 5 years. There are exceptions, though. For example, if you’re a first-time homebuyer, your Roth IRA withdrawal may be tax-free if you have met the 5 year requirement.
Taking early withdrawals from Traditional IRAs may also be subject to income tax and penalty.
That said, if you're unsure about your status, it’s best to consult with a tax expert or financial advisor.