There would be invalid transactions (due to invalid credentials, double-spending problems, etc.), and failed transactions (due to some error in the smart contract function, not enough gas fee, etc.) in the blockchain. We can see the failed transactions in a blockchain explorer like etherscan. But the failed transactions are not available there. Although the transaction became failed, how come they got included in a block, and they are visible in a blockchain explorer?