If at all possible we never want to tap into our IRA or other investment account before retirement, however, perhaps for some unforeseen circumstance you were forced to do it.
With the ROTH IRA you are not going to pay any taxes or penalty on the amount that was originally principle that you contributed, however, with a traditional IRA you are going to owe income taxes and possibly a 10% penalty if you are under 591/2.
However, there are exceptions. If you are disabled, or if the money was used for unreimbursed medical expenses, qualified higher education expenses, or the purchase of a first home you may not have to pay the penalty. If you fall into any of these categories make sure you talk to your tax preparer. If this was overlooked in the last three years look into amending your return.