Sharding is a technique for scaling databases by partitioning data across multiple database servers or nodes. There are different ways to implement sharding such as sharding on the primary key or an index in a relational database. For key-value stores, a common approach is to hash the key and assign it to a node using consistent hashing. While sharding improves scalability, it also introduces some limitations like not being able to perform joins across shards and additional work required for data maintenance.