The major difference between these is that publicity is simpler than public relations but is, at the same time, less effective.
Publicity refers simply to the practice of getting people to notice your firm without having to advertise. It is done by getting the media to run stories about your firm or your product. Thus, publicity is relatively easy to obtain by creating press releases or made-for-media events.
Public relations is more difficult. It is about trying to create a particular image for your firm in the eyes of the public. It has to be a two-way street. The firm must listen to the public and determine what the public thinks about the firm. It must then craft ways to effectively project the desired image to the public. This is much harder than simply getting publicity, but it is also more beneficial because it causes people to have a positive image of the firm.