If the pc components happen to be compatible (current or previously used components in Apple hardware), it's possible to install OSX/macOS on it, hackintosh style[1].
Unless something has changed, it's annoying as hell to actually install Linux or Windows over the entire hard drive. They want some specific bits at the front of the hard drive.