Technically, using copyrighted songs without permission is illegal. However, in most cases, playing songs at a private party is considered a 'fair use' of the material and is unlikely to result in legal action. If in doubt, you may want to consider using a licensed music service or creating a playlist of royalty-free music.