How to mail the editor asking to withdraw my submission? How do I say to the editor that I want to withdraw my paper from his journal?

I had submitted a paper to a journal 10 days back. When I checked recently, the status was showing "Under Review".

But just today, one of my friends found a serious flaw in one of my results!  Now I need to withdraw my paper from the journal so that we both can review it and then send it again.

I also want to include my friend's name as a co-author because he helped me a lot.

Can I mail the journal editor saying I want to withdraw?  It has been only a 3-4 days the status is showing "Under Review".
Until you give up copyright to your work it is yours. Yes, you can withdraw it. However, you might be better served by sending a note that you have found a flaw and expect to have a revision of the paper within X days, where X is reasonably small. Ask how to proceed and ask if the editor can just put the paper on hold for the interim. 

I can't predict the response, but it might be better than withdrawing it altogether. But, yes, you can do that. 

Adding the colleague as a co-author should also offer no difficulties.