Charged systems in bulk and at interfaces