Publicity is way of providing newsworthy information about your company and its product to the general public. It involves Writing a Press Release of newsworthy information about your company and its products and sending it to the media. The media will often use the information if it considers the press release to contain genuine news and not information designed to sell your product. The advantage of publicity over advertising is that publicity is free and usually reaches a larger and broader audience.
Public relations is closely related to publicity and focuses on managing the relationship between your company and its customers and the general public. It focuses less on selling your products and more on promoting your company as a good neighbor and a valuable part of the community.