Will a mac ssd (it already have the os x) boot on a pc? So I broke my macbook and I believe that the ssd is still alive with latest os x on it. If I take out the ssd and put it into a pc will it boot?
I saw that apple forbid using their os on a non mac machine.
No, it won't boot natively, nor will it even mount on a Windows machine without a 3rd party translator 'plugin' to be able to read HFS+ or APFS.
Further, if it's APFS then I think only Paragon make a translator - APFS for Windows
They also do one for HFS, but I think there are other alternatives - HFS+ for Windows 

Depending on what the macOS version was will depend on which of those you might need. HFS was default until Sierra, since then it's been APFS.