there is a big difference here, so I'll have to give you two different answers and you'll have to decide for yourself which answer fits you more.
for generated characters, expressions are usually done by slight changes to the face parts. Like using a different mouth or eyes when constructing the face. This requires some experimenting as not all changes fit correctly, but that is the reason why you can store the generator settings as json files in addition to storing the picture itself:
you make the basic character, store it in json and then experiment with changing parts for different expressions, reloading the original settings from the json file whenever needed to get back to it.
for painted/pixeled characters or when a generated character doesn't have the correct parts available, the only way is to open the picture in an image program (photoshop, GIMP, paint.net or almost anything but not MS Paint) and draw the changes yourself.
in some cases this has been done in the past by artists who gave those pictures away, but in most cases that requires at least some artistic skills - or you have to use the resource request forum if you can't get it correct yourself.