When you go on holiday, there is no question of leaving your cat or dog alone if a neighbour does not come to take care of it...
You have the possibility to take it with you but in the plane, but certain conditions are imposed on you: if your pet weighs less than 5-6 kg (cat, chihuahua), it can travel with you in the cabin. However, it must be installed in a cage approved for its size. If it is too large, your dog or cat may be shaken and injured in case of turbulence during the flight.
For the duration of the flight he will not be able to leave it. This cage will be considered as extra luggage, for which you will probably have to pay an extra fee.
Be sure to check with your airline before you leave and mention its presence when booking your trip. You will have to give all the information about your pet, to make sure it can make the trip with you. Indeed, some dogs are not accepted (molosses, pitbulls, pregnant bitches...).
Above the threshold I have just mentioned, your pet will have to travel in the hold of the plane. The latter are pressurized and heated, so don't worry. It is important to ensure that you put a label with all the relevant information: your name and destination, possibly the precautions to take when handling your animal's cage. Also make sure your pet is well cared for (especially during transfers).
In any case, you must ensure that your pet's vaccinations are up to date before leaving. If you are travelling in Europe, your cat or dog must have a European passport and an electronic identification chip. Warning: some countries (Sweden, Ireland, United Kingdom) have additional health requirements.
For countries outside the EU, find out about the specific conditions in each country, to avoid any risk of being refused entry.