This is from an older question I answered about cleaning a keyboard:
If you lift the keys up and look under the bottom edge, you can see the brackets, and use a tiny screwdriver or other tool to carefully pop them free. I slide the tip of a metal spudger between the white bracket and key, then lightly twist to free the bottom, once the bottom is free, it's easy to pop the top of the key out.
If you just pry them out, the plastic brackets pop out sometimes and require re-assembly, which is easy if you are familiar with them, but can be frustrating if you've never dealt with them or know how they go back together.
To re-assemble, you just press the keys back into place, you may have to push on the corners, or try a couple times to get them to click back down. Be sure to feed the little metal support rods back through their holes before pressing the keys back into place.