An npub is a Bech32-encoded version of your public key. The raw public key is 64 characters of hex, which is unambiguous but unreadable. Wrapping it in a Bech32 envelope with the npub prefix gives you something like npub1pf8hkx3ang2jngcgpsawtmj48c90pgqasmgpva7qhvnsty5j87yqwk3vy5 that is easy to copy, paste, and visually distinguish from a private key.
Any Nostr client accepts either form. The npub form exists because copying the wrong hex string around is a security hazard: a public key is fine to share, a private key is not, and the prefix removes the ambiguity.