Both most likely.
So, if I use a hack on BF3, will I get banned from Origin, or only from the server I was playing?
Nope.
You will be banned so you can't play on Punkbuster servers, at that means you can only play on none-punkbuster servers "of course" and you will most likely face only cheaters.
i hacked bf3 and punkbuster ban me. i have writte a message to pbbans and it left my bans from Punkbuster server