Maybe this way of thinking about it will help:
When somebody creates a work (say a library) then, by default, you have no right to use it in any way.
The licence is a document with a set of terms and conditions the author requires you to adhere to in order for you to gain certain rights to use the work. Exactly what those terms are and what rights you are granted depends entirely on the text of the license.
Some licenses require nothing of you and grant you every right imaginable.
Some require you to publish the licence along with your work.
Some require you to release any modifications (if any) to the licensed work.
Some require you to release the source of your own code.
Some require you to pay a licencing fee.
Etc.
The rights you are granted (if you adhere to the terms) also vary.
Some licences allow you to do whatever you like with no restrictions.
Some allow you to access and modify the source.
Some just allow you to use a specific binary.
Some allow you to share modifications and some don't.
Etc.
In any case, the license is what the author has chosen to require of you in order to allow you some use of their work and is the only thing that allows you to use it at all. But, the only way to know specificaly what you need to do and what rights you are granted in return is to read the text of the specific license in question.
And of course you always have the option of just not using the work if the license disagrees with you Note that I am not a lawyer, nor do I play one on TV. For proper legal advice contact a real lawyer