The situation is complex and quite variable.
If the delivery is done by La Poste (the incumbent postal service), they usually have access to those mailboxes (they have the RFID equivalent of a master key, as well as master keys to open the mailboxes to deliver parcels in them, if they are standard mailboxes). The exception is if there’s a concierge, in which case they will receive mail and deliver it into the mailboxes (this is becoming quite rare in France). The standard parcel delivery service of La Poste is called Collisimo.
If they can’t get access or the parcel is too big for the mailbox, they should normally ring using the “interphone” if there is one.
If this fails or they’re in lazy mode, they will leave a missed delivery note, and you will either be able to pick up at the nearest post office, or the option to chose another delivery attempt (not sure if this is generalised).
Note that special instructions are usually not available, it’s the address and nothing else.
Most of this usually also applies to parcels delivered by Chronopost, though this may vary locally.
Most other private delivery companies will not have access to the mailboxes inside. They will either:
call you when they are about to deliver (some use this to coax you into stepping down to the street to get your parcel instead of coming up to your flat like they’re supposed to)
call you if they can’t make the delivery
leave a note with options
leave a note letting you know they delivered the parcel at a nearby store
pretend you weren’t home even if you were and deliver it directly to a nearby shop and let you know by email or SMS
Some will attempt a second delivery.
In most cases, you can provide additional instructions, including the “digicode” (code used to enter the building), the number or name for the “interphone” (an audio or audio-video system between the building entrance and each flat), and possibly instructions on what to do if you are absent (leave in location X, leave with neighbour Y, etc.).
Note that “nearby shop” can be quite a distance. There are several different networks of shops providing this service, so depending on which network the delivery company works with, and which network local stores are affiliated to, it may end up in different locations, some quite further than others.
Most sites (including Amazon) will actually let you pick directly a store to have the parcel delivered to. Some will even provide this service cheaper than home delivery. The generic name for the service is “relais colis”, and the site may be affiliated with one or more of the networks. You’ll usually have a map to pick the most convenient location, with opening hours etc.
Don’t hesitate to call the shop before going there to reconfirm their opening hours, the data is not always up to date.
Other options include Poste Restante (only for parcels delivered by La Poste), mailboxes in post offices (though I believe this is becoming quite rare, and is probably expensive for mailboxes suitable for parcels), lockers (either those of Amazon or those of La Poste), and more, but they are often restrictive.