Porto has a mild, oceanic climate and is colder than Lisbon and the Algarve. The average temperature in winter is about 14ºC and in summer it's around 25ºC. Nevertheless, in dryer periods, it can quite easily reach above 30ºC in summer and drop to between 5 and 0ºC in winter.
Porto has quite a high level of humidity as it is close to the sea and the Douro River, which makes it feel milder in winter and cooler in summer. In more humid years there are often showers during the hottest season.
Spring and autumn are usually very pleasant whilst in winter, Porto is rather colder and wetter, so you'll need a warm coat, as well as a hat and scarf!
The months with the most rain are November and December, the coldest are January and February and the hottest are June and July.