The good news is that kittens are mostly pre-loaded for this. They have a strong instinct to eliminate in loose, soft material and then cover it — which is exactly what a litter box provides. Litter training isn't really about teaching them something new; it's about giving them the right setup so their instincts kick in correctly.
Problems with litter training almost always come from the setup, not the kitten.
Getting the basics right
Box size. A standard adult-sized litter box is too large for a young kitten. They need to be able to get in and out easily without climbing. A low-sided box — or a baking tray-style container — works well for kittens under 12 weeks. As they grow, they'll use a standard box fine.
Litter type. Unscented clumping litter is the standard starting point. Avoid strongly scented litter — it smells fine to you, overwhelming to a kitten. For kittens under 8 weeks, use non-clumping litter; very young kittens sometimes eat litter while exploring, and clumping clay can cause problems if ingested.
Location. Quiet, accessible, not near their food. Cats prefer privacy for elimination, and a box in a high-traffic area will be used less reliably. Keep the box somewhere the kitten can always reach it — if it's on a different floor from where they spend most of their time and they're very young, that's too far.
Number of boxes. One box per cat plus one extra is the guideline. For a single kitten in a small space, two boxes placed in different locations works well.
Introducing the kitten to the box
Show them the box when you first bring them home. Place them in it gently. If they sniff around or scratch at the litter, that's the instinct taking over — let them do their thing. After meals and after naps are the highest-probability moments for needing to use the box; take the kitten to it at these times for the first few days.
Don't move the box once the kitten has found it. Don't rearrange the location during the training period. Consistency in where the box is located matters.
Keeping it clean
Scoop at least once a day. Cats will use a dirty box less reliably — some refuse it entirely. The more fastidious your kitten's instincts, the more they'll reject an unclean box. A box that gets scooped once a day and changed out weekly is clean enough for most cats.
If your kitten is using the box consistently and then stops, check the box cleanliness first. It's the cause the majority of the time. The second most common cause is a medical issue — a urinary infection makes elimination painful, which cats then associate with the box. If the kitten seems to strain, cry while using the box, or there's blood in the urine, that's a vet visit.