One way is that water takes a lot longer to change temperature than the air does, so places near the water will have a colder climate in summer and a warmer climate in winter. Another way is that ocean currents are able to produce air masses, which then in turn directly affect the climate of a region. For example, if the Gulf Stream current (a warm current) was flowing by my region, it would probably produce a warm air mass.