There are several ways, no way is best for every kind of canvas.
In most canvases you can fold over the edge and hand embroider around the edge. When you do an images search for -edge embroidery stitches- (order of words may change the results) you will get many stitches that will work.
In some cases the canvas is so strong or stiff that it will not fold over as wanted or sticks out between the edge stitches. In that case you may want to apply a narrow strip of tape to the edge (cut or folded) and embroider over that.
In some cases people embroider a strong strip just inside the actual edge, all around, and tease out the canvas outside that strip, ending the patch in a fringe.
There is also an option of using glue on the edge, with or without embroidery, I am not familiar with that method, but I know it is on the WWW.
Some of these methods can also be done with machine embroidery, but you have to be careful to stitch on a raw edge, as it is harder to get an even set of stitches. If you want to try, set the zigzag stitches to the widest it can, the distance between stitches very short, and carefully stitch on the edge of what you want to keep. It will be easier to first stitch and next cut, but it has the risk some of the canvas will still be visible.