For the altitudes most of us fly, it is simple. In general, when in Class E, D or C, you must remain 500 feet below, 2,000 feet laterally or 1,000 feet above any clouds. This is to allow an IFR aircraft popping out of the clouds sufficient time to see and avoid a VFR aircraft.