how do I edit a jpeg file

After loading a jpeg file into libre write I want to change words included in the image. Then I want to save it as a jpeg file again.

Please use software that is intended for raster image editing, e.g., Gimp. LibreOffice is not a raster image editor.

You could open the jpg raster image in Draw and set some textboxes (white background or similar) on it to “overwrite” original text parts. You may select all and export (selection) as jpg again. This is only a workaround for some cases; in most cases Mike’s advice is better…
In LO Writer you cannot combine some drawings and images for selective export as you can do on Draw; so you have to export the entire page…