Monoecious figs like F. aurea have both male and female flowers within the syconium.
From the en.wikipedia.org
Female wasps squeeze their way through the ostiole into the interior of the syconium.
From the en.wikipedia.org
Inside the syconium, they pollinate the flowers, lay their eggs in some of them, and die.
From the en.wikipedia.org
The fig fruit is an enclosed inflorescence, sometimes referred to as a syconium, an urn-like structure lined on the inside with the fig's tiny flowers.
From the en.wikipedia.org
More examples
The fleshy multiple fruit of the fig consisting of an enlarged hollow receptacle containing numerous fruitlets
A syconium is the type of fruit borne by figs (genus Ficus), formed of an enlarged, fleshy, hollow receptacle with multiple ovaries on the inside surface. In essence, it is really a fleshy stem with a number of flowers, so it is considered both a multiple and accessory fruit. ...
A `fig', the multiple fruit formed in figs (Ficus species) by the invagination of the floral axis where the minute flowers and fruits are actually inside the swollen inflorescence stem. Fig.18Y. cf. aggregate fruit, syncarp.