Musical instruments can be categorized based on how they produce sound. Percussion instruments create sound through striking or shaking, such as drums and maracas. Instruments in the rope category, like guitars and pianos, generate sound through vibrating strings.