I've heard you can reduce your taxable income by opening an ira. My question is when you fund your ira, do you need to have the money deducted from your paycheck? Otherwise, how does the IRS know the money is money earned in the current tax year and not prior savings dollars, or does it not matter?
No, you don't have to have the money deducted from your paycheck. The IRS doesn't get a copy of your paycheck anyway.
When you file your annual tax return (form 1040), there's a line there to write down the amount you contributed to the IRA. In fact, you can contribute to the IRA after the year ended, until the Tax Day of the next year, so that you can make sure your contribution will actually be deductible (not always they are).
The IRA custodian (the brokerage firm/bank where you opened the IRA account) will provide you with a deposit confirmation and form 5498. A copy of form 5948 is also sent to the IRS.
And on the last sentence, it doesn't matter when or where the money was earned (money is fungible, so there's generally not even any way to tell), but you do have to have sufficient earned income (that's basically money you earn from working, not from dividends and interest or selling stock and the like) in the contribution year to cover the IRA contribution.