If your beard trimmer is waterproof, a quick rinse under the faucet is the best way to go. But use caution — this technique can and will destroy many models. Removing the blade assembly for wash is always a safe bet.
Many beard trimmers ship with small brushes that you can use to whisk trimmings out of the blade assembly. Using these brushes regularly is a good way to keep your blades sharp and free of obstruction.
After cleaning, dab a bit of blade oil on to the assembly and run the motor for a few seconds to evenly distribute the oil.