Mac runs same vm. Cannot exit I have inherited some Mac-based machine, but when I power it on - virtual machine with Windows XP starts. I cannot figure, how to exit this mode or restore Mac to factory defaults. I tried booting with pressing Fx keys, ⌘ Cmd+R and C.

Nothing works, and Windows XP is booting normally.
Hold down the Option key (⌥) when your Mac starts. That should take you to the startup selection screen. Hopefully it'll show you an icon for Windows and another icon for OSX. 

http://support.apple.com/en-us/HT1310

If it doesn't then you might need to install OSX from scratch. If your Mac is fairly recent you can do this from the Internet directly. Otherwise you'll need to source install media.

http://support.apple.com/en-gb/HT4718