It's my first time travelling, I've booked a return flight with different airlines there and back. When checking in do the airlines use the same ticket number? Because on my e ticket there is only one ticket number, so would this work to check in both times?
A return ticket is a ticket where you have a flight going to a destination and one coming back from the same destination to your point of origin. This is a type single ticket and therefore has a ticket number, as opposed to booking two one-way tickets which would give you two ticket numbers.
It happens that flights going and coming back are operated by different airlines or that they are in fact the same airline but flying under a flight number from another airline. This is nothing to worry about. Note that one or both flights (going and coming) may have multiple connections and in may even use flights from different airlines per segment.
Additionally to your ticket number, you will be given a Reference Locator (usually a number of letters and numbers) that identifies your whole trip. Commonly, one Reference Locator identifies at least one ticket. If multiple passengers are travelling together, the Record Locator will identify all tickets for the group, since each passenger gets a ticket number.
Depending on your trip and agreement between airlines, it can get more complicated, so this answer is not an exhaustive description of all permutations, just know that it can happen that mapping ticket numbers to reference locators and back is not always as simple as in a one-way or return case.