You program the FB and then you call the FB.
When you program in the call you are prompted to enter a DB number for the IDB, the system then creates the IDB, it will contain any IO parameters plus the STAT parameters.
I've seen some inexperienced programmers create a FB and don't have any IO or STAT's, they still have to create the IDB which is empty. A classic case of 'SHOULD HAVE BEEN A FC'.
The IDB at the end of the day is JUST A DB, you can access and change data anywhere in the program within the IDB in just the same manner as a global DB. The main difference is the fact that you cannot modify the DB make-up, i.e. you cannot open the IDB and add a few words.