Start here. This is the direct spoken answer to practice first.
Why this question matters
A failed pipeline can come from code, tests, configuration, infrastructure, credentials, or an unreliable check. A disciplined investigation separates those causes before anyone retries or changes the release.
I would first identify which stage failed: restore, build, test, static analysis, packaging, or deployment. Then I would read the logs around the first real error, not only the final failure message. If it fails only in CI, I would compare environment differences such as SDK version, OS, configuration, secrets, test data, and parallel execution. I would avoid rerunning repeatedly without understanding the cause.