lets say i have a program that is the same name as a magazine or other type of media like movie or book. lets say i make a program called "PC Magazine" which lets you create magazines on your computer. Is this legal since there is a famous magazine called "PC Magazine"?
Understanding copyright law
You need to educate yourself about copyright/trademark law. Nolo publishes some excellent books on the subject, including "Patent, Copyright, Trademark: An Intellectual Property Desk Reference".
Titles are generally protected by trademark law; a trademark in one area (like a magazine) doesn't automatically apply to another area (like a game) unless the holder of the trademark has used it in the other areas or protected it through filing for a copyright registration.
The specifics of your case, however, totally depend on the actual name in question.
Even if it is legal, don't forget that using the same name as something that is quite well known makes it hard for people to search for your product.
It basically boils down to "would the name create significant confusion in the marketplace". I'm no lawyer, but in this case I'd have to say "Yes". One is a magazine about software, the other software to make magazines. My recommendation would be avoid that name.
You can do a simple trademark search at the US trademark and patent's website here.