The requirements to be able to legally fish, as well as to be able to keep the fish that you catch, vary from country to country, and even region to region, as do the requirements to obtain these licenses.
In the UK, there are even different licenses for different types of fish. A Rod Fishing License is required to fish salmon, trout and other types of freshwater fish. This includes eel and smelt as well.
There are other licenses for bigger fish.
The same is the case in North America, often with valid licenses required for various fish and in different regions. The standard requirement across the sectors often include an application form, and sometimes a test.
To ensure that you meet the requirements to fish, and to do so legally, check the website of your local government or the authority of the region you are looking to visit or fish in, as there is no universal fishing license. Also, it can be crucial to be aware of fish which are native to the area, as well as any species that may be endangered, and therefore illegal to fish or to keep.