HBO, Showtime, Cinemax, TMC, and Starz are a pay service so they can do pretty much whatever they want since you pay an additional monthly fee (in additional to your satellite/cable bill) to view it.
Cable in general is unregulated by the government and that is why RAW can do things Smackdown can't and also shows like South Park and Nip/Tuck can air.
Local channels are generally affiliates of the 4 main networks (ABC, NBC, FOX and CBS) and air affiliate programming during the day (soaps if the network has them) and during the evening. They run whatever they want inbetween and also show local and the network news (except FOX). Some are also affiliates of the WB and UPN (smaller networks than the other 4 but are devoid of network news and usually don't have as many shows or as many nights of network programming). There are also some local independent stations that show whatever they want. These channels are all regulated by the FCC since they are broadcast networks (you can get them over the air vs cable channels (Spike TV, CNN, MTV) which you have to pay a fee for and are thus not as regulated.
PBS is a goverment/corporate/viewer funded network of shows (Sesame Street, wildlife shows, etc). PBS has affiliates just like the above broadcast networks.
Hope that helps. It's just a general rundown.