If you need to return or exchange your ticket, it is important to remember that the terms of returns or exchanges depend on the airline's rules, the fare chosen, the time before departure, the travel agency rules (if applicable), as well as a number of other factors.
Usually, these rules are available for review in the process of issuing a ticket. If you don't remember the conditions, you can always check with the company where the tickets were purchased, or directly with the carrier.
If a mistake was made when inputting your name, it is often not a deal-breaker - many airlines allow up to three errors. But, better safe than sorry, so it's best to clarify whether you will be allowed to travel with such errors (irrespective of how they occurred). It is usually a best practice to contact the airline directly for the most accurate and prompt answers and fixes.
In any case, after you purchase the ticket, in the confirmation email you would find Booking reference (usually 6 letters). With this reference and your First/Last name go to the airline website and find the Manage booking page. Enter your details and you will be able to see ticket details and ability to manage it.