Depends on the brand, most laptop keyboards are one piece that are easy to replace as a whole and not a single key at a time.
it also depends on what broke. a key is usually made of 4 parts:
a) the key
b) the plastic pieces/piece that connects the key to the computer
c) the metal piece that holds b)
d) the "button" itself (often there's a little plastic "dome" around it)
if a) is lost/broken, you can take a key that you don't use so often and use it as a replacement, just make sure its the right size before you pop it off
if b) is lost/broken, same as a)
if c) is broken, you really have to replace the whole keyboard
if d) is broken then same as c), but sometimes the only issue is the plastic "dome" and you can take it off another key and glue it on to the one that went missing.