Different speedrun communities define "glitches" and decide which to allow/ban differently. There's always going to be some subjectivity.
In the community I'm most familiar with (Legend of Zelda: A Link to the Past), we assume that the devs did not intend for you to wiggle through single-pixel diagonal holes in sloped walls to get out-of-bounds or trigger the flute you may not even have by using a potion on the same frame you go through an east-facing door, and because those techniques allow you to play the game very differently than designed, we consider them major glitches and put runs using them in different categories.
There are several glitches that we classify as "minor" and allow in every category like item dashing and spin speed. Some people argue whether bomb jumps are glitches or not, but they're also allowed in every category.
At the far glitchy end, there's something called the "exploration glitch" that allows you to change Link's sprite's layer to one that allows you to walk semi-freely between map tiles. Exploration glitch is banned in all but a few very specific categories because it completely trivializes the game and lets you walk to the Triforce room within 90-120 seconds of starting the game.
The point of all this isn't to determine the single valid way to play the game (hi Twin Galaxies!) but to allow for sets of rules that make the speedrun more interesting. The same goal (reach the Triforce room) takes 1m31s with no restrictions, 26m50s with the "worst" game-breaking glitches banned and 1hr23m19s with all major glitches banned, and all three are completely different experiences.
Edit: some extra info on minor glitches (https://pastebin.com/zYM6TPmS) and major glitches (https://pastebin.com/bb0vHjcm) as defined by the ALTTP community, and the leaderboard with all the categories: https://www.speedrun.com/alttp