My guess is you activated the "Cover to Mute" accessibility feature where you cover the screen (say, with your palm) for I believe 3 seconds and mute is automatically switched on. I've done it accidentally a time or two and believe I've seen some people on here say they have as well.