There are different sorts of IAPs. Consumables need to be bought for each device but non-consumables are recoverable to any device logged into the account. If you try to purchase them again they are free and the developer SHOULD implement a 'Restore Purchases' UI to allow you to recover them all without accidentally buying ones you don't already own.
With IAP the developer can also retrieve a receipt from the device that can be verified by Apple's servers (process different in the Mac App store). This does not apply to the original purchase of apps from the store, only in-app purchase.