You need to go step by step.
Below is the diagram - how shibboleth works (very high level!).

Here, shibboleth SP and Shibboleth IdP are two softwares you need to download and install from shibboleth website and SP application and IdP application are two things you need to develop.
I suggest you first develop SP. Use this and this to do so. Then you develop IdP.
Coming to metadata.
The main configuration SP and IdP needs is metadata. shibboleth2.xml
is the file where you do this. SAML needs data where to redirect and where to get assertion from and what is encryption. But Shibboleth has made this easy. everything is taken care by shibboleth you just need to provide path where metadata is located.
What we do is configuration - in shibboleth2.xml
(I am telling in context of SP but understand same for both- SP and IdP).
Elements of configuration
RequestMapper
- Our host to secure
ApplicationDefaults
- just change entityId here, change it to anything.
MetadataProvider
- give IdP's entity Id and metadata url.
This is basic configuration needs to be done on SP side.
Metadata can be generated by shibboleth system using above configuration and can be downloaded from https://mywebsitehost.com/Shibboleth.sso/Metadata
, same is for IdP. SP and IdP can connect and get information by entityId.