Any background music you play while streaming on online platforms such as Twitch or Youtube is subject to copyright law. Often, online platforms implement audio recognition systems to automate the detection of copyright infringement.
Violation of intellectual property rights, "infringement" with regard to patents, copyright, and trademarks, and "misappropriation" with respect to trade secrets, can be a breach of civil law or criminal law, which depends on the type of intellectual property involved, the jurisdiction, and the nature of the action.