Media (see types of media) are linked to people and families, and sometimes to a specific event. Eg, a birth certificate ('document') may be linked to a birth event and a wedding photo to a marriage event. A media item (usually a photo) can be a "default" item, which means that it will display next to the name/s at the top of the individual or family pages and in charts.
Group photos can be "tagged" so that, as you move your cursor over the photo, the known names of those in the photo will be revealed. If they are people in the family tree, you can use that tag to link to their individual page. I use different colours to distinguish those in the tree (green) and those who are not (grey).