re:
> When I run the trim command in my cylinder, both sides are trimmed. How to trim only one
> side or correct the back surface?
If you want to cut only one side you would need to extrude out the cutting object with a limited extrusion distance so that you have a solid that doesn't go all the way through the object. Then use that solid as the cutting object instead of using the curve as the cutting object.
To heal the back like Brian writes above you can do an "untrim" to do that. Select the back face and delete it so you have an opening there, then select the edge of the open boundary and you can use Delete to remove it.