Transferring from 401K to IRA?

I had a pension with my state job for 15 years. I was vested, but I was not at retirement age and either had the option to leave the pension with the company or transfer it to an IRA or to a 401K with my current company.

I made the mistake of transferring it to my 401(k). Is there a way to transfer the funds from my 401(k) to an IRA?

Are there any penalties or crazy amounts of taxes that I will have to pay for that transfer?

And if it's possible to do, should I do a traditional IRA or Roth IRA?