The Challenges of Dealing with Software Licensing

Have you ever had any issues with software licensing? If you have had some sort of issue in terms of breaching some software license, how did you manage to deal with it? What precautions would you say I should take to ensure I do not fall into the same trap or problem with regards to software licensing?
