SHA3 (Secure Hash Algorithm 3) was standardised by NIST in 2015. It is based on the Keccak sponge construction — structurally different from SHA1 and SHA2's Merkle-Damgård design, making it resistant to length-extension attacks.
Keccak was the competition winner. NIST modified the padding scheme slightly when standardising it as SHA3. Keccak-256 and SHA3-256 give different outputs for the same input. Ethereum uses Keccak-256 (not NIST SHA3).
SHAKE128 and SHAKE256 are extendable-output functions (XOFs). Unlike fixed-output hashes you can request any number of output bits. SHAKE128 gives 128-bit security; SHAKE256 gives 256-bit security at any output length.
Both are secure and widely trusted. SHA2 has broader platform support. SHA3 is preferred when you need algorithmic diversity, resistance to length-extension attacks without HMAC, or when standards require it explicitly.