There are a couple things you can do. What I would do (but I don't necessarily recommend for everyone) is to just take the needles out and rip out my knitting to the row before the mistake. What I might recommend for someone less foolhardy is to go back stitch by stitch, un-knitting. NAK or I'd explain better.
You could also take some waste yarn and a yarn needle and run it through the last "good" row to hold your place, then rip back to that place.
When you're putting your work back on the needle after ripping, make sure you don't twist stitches. Say the stitch looks like an upside-down "U". Then the right leg should go in front if the needle, the other in back. I wish I'd known this when I frogged (ripped out) my first big goof.
What are you making?