I have to create an application for iOS and Android, from which I can buy some "items".
I don't understand how the in-app purchase work; can I buy and download the content I already paid for? Or can I buy just the unlocking of internal content without downloading it? If its just for unlocking internal content, is there any way to buy and download the content?
Thanks
The only thing you can't do with in-app purchase is selling actual goods - that's also allowed in case you have a website doing the same thing (eg ebay app). And there are some more rules for iOS in-app purchase.
As for the step by step idea about in-app purchase, here is a gist:
In a nutshell, you have a long way to go. The best way to start theoretically is to refer to In-app purchase programming guide. In addition, this book by Apple is also helpful. And for your needs, here is a sample code from Apple to begin with.
If you rather want a step by step tutorial, here is one authored by me. A rather easier one is the video lecture series with SWIFT and Objective C - prepared by me - which also accompanies code sample for SWIFT and Objective C to save time.