Onlays and Inlays are mainly to replace large areas of damaged teeth where it is more conservative to have than a crown but more successful than a filling. Your dentist will advise if you need inlays or onlays.
An onlay is a type of partial crown that predominantly covers the biting surface of the tooth and then only as much of the rest of the tooth as necessary. It conserves more of the natural tooth structure and relies more on the adhesiveness of the cement on holding it in.
An inlay is more conservative of tooth structure than an onlay.
For more information regarding this treatment:
OR