Reptiles were able to leave water completely only after evolving a relatively water-proof skin and an amniotic egg. A hard shell and membranes around the developing embryo limit water loss. Because of this reptiles are in some ways closely allied with birds and mammals. The most characteristic shared trait between modern day amphibians and reptiles is ectothermy. In order to remain physiologically active for long periods of time, animals must maintain a high core body temperatures.
Ectotherms usually keep warm by muscle activity or by sunning.
The reason these 2 groups are studied together is mainly historical. As recently as 100 years ago amphibians were classified as a sub-group of reptiles and studied together as the field of herpetology. This historical classification has been preserved and herpetologists still study both amphibians and reptiles, but many specialize on one or the other.