A 401(k) is a type of retirement account that’s provided by companies. You can only get it if your company provides it. Most of the contributions to it are from your paycheck, though sometimes an employer makes ‘matching’ contributions. When you leave the company you lose your ability to make contributions to it.
An IRA is short for “individual retirement account”. It’s a type of account that you can open on your own, and doesn’t depend on your employer. It’s also an account where you can transfer any 401(k) savings you accumulated at a prior job. Think of it as a big pot that you pour your 401(k) gold into over time.