With great difficulty, in some cases! Opening up a laptop is not at all like opening up a desktop PC. You would benefit greatly from the engineer's manual and a good dose of psychic ability. A seasoned engineer wouldn't have a problem, but a casual DIY-er should steer clear. Only you know what category you fit into.
Second hand replacement keyboards are perennially available on eBay, but beware. The fault could be with the motherboard, rather than the keyboard - and that is harder and more expensive to replace. If in doubt, contact your local laptop repair shop.