Your ROI is basically your net profit (or return) divided by the total amount you've spent in buy-ins.
Say your net profit is $200 and you've spent $600 in buy-ins (of course meaning you've actually won $800 in placings, but $600 was used for fees). 200/600 =0.3333, so your ROI is 33.33%. Note that ROI is only applicable for tournaments, because in ring games you pay no buy-in fee to play.
As for what a good ROI % is, maybe someone else could give some insight into that, because I'm not entirely sure.
EDIT: Actually I went searching for a post where DM talked a bit about ROI and found it...
Originally Posted by Dorkus Malorkus
Just a word of warning, a 50% ROI is unsustainable - don't expect to be able to maintain this figure no matter how good a player you are. Around a 30% ROI at the micros and 20% at mid-stakes (give or take 5%) are generally considered to be 'plateaus' for long-term ROI. It seems like you're a good player, but you're also running good, so don't let it get to your head too much.
Obviously credit goes to DM for that information. And I'd add that this is speaking of SnGs. I have no idea if the expectations for long-term ROI in MTTs are any different or not.
Of course, I'm also in the process of trying to prove DM wrong, because I think a 40% ROI at $10 buy-ins can potentially be sustainable.