The terms are shortened from Latin rect? foli? and vers? foli?, translating to "on the right side of the leaf" and "on the back side of the leaf". The two opposite pages themselves are called folium rectum and folium versum in Latin, and the ablative recto, verso already imply that the text on the page (and not the physical page itself) are referred to.
In codicology, each physical sheet (folium, abbreviated fol. or f.) of a manuscript is numbered and the sides are referred to as rectum and folium versum, abbreviated as r and v respectively. Editions of manuscripts will thus mark the position of text in the original manuscript in the form fol. 1r, sometimes with the r and v in superscript, as in 1r, or with a superscript o indicating the ablative recto, verso, as in 1ro. This terminology has been standard since the beginnings of modern codicology in the 17th century.
Lyons (2011) argues that the term rectum "right, correct, proper" for the front side of the leaf derives from the use of papyrus in Late Antiquity, as a different grain ran across each side, and only one side was suitable to be written on, so that usually papyrus would carry writing only on the "correct", smooth side (and just in exceptional cases would there be writing on the reverse side of the leaf).
The terms "recto" and "verso" are also used in the codiology of manuscripts written in right-to-left scripts, like Syriac, Arabic and Hebrew. However, as these scripts are written in the other direction to the scripts witnessed in European codices, the recto page is to the left while the verso is to the right. The reading order of each folio remains first verso, then recto regardless of writing direction.
The terms are carried over into printing; recto-verso is the norm for printed books but was an important advantage of the printing press over the much older Asian woodblock printing method, which printed by rubbing from behind the page being printed, and so could only print on one side of a piece of paper. The distinction between recto and verso can be convenient in the annotation of scholarly books, particularly in bilingual edition translations.
The "recto" and "verso" terms can also be employed for the front and back of a one-sheet artwork, particularly in drawing. A recto-verso drawing is a sheet with drawings on both sides, for example in a sketchbook--although usually in these cases there is no obvious primary side. Some works are planned to exploit being on two sides of the same piece of paper, but usually the works are not intended to be considered together. Paper was relatively expensive in the past; indeed good drawing paper still is much more expensive than normal paper.
By book publishing convention, the first page of a book, and sometimes of each section and chapter of a book, is a recto page, and hence all recto pages will have odd numbers and all verso pages will have even numbers.
In many early printed books or incunables and still in some 16th-century books (e.g. João de Barros's Décadas da Ásia), it is the folia ("leaves") rather than the pages, that are numbered. Thus each folium carries a consecutive number on its recto side, while on the verso side there is no number. This was also very common in e.g. internal company reports in the 20th century, before double-sided printers became commonplace in offices.