Yes, fencing is considered an olympic sport.
Fencing events have been present in every single edition of the summer Olympic games of the modern era, starting with men's events in the very first edition back in 1896. Women's fencing events came shortly after, in 1924.
In addition to that, while many other sports have events that are more important for athletes than the Olympic games, for fencers the Olympic gold is the highest of the highs, and winning it is what every fencer dreams of since their beginning in the sport.
In addition to being part of the Summer Olympic Games, fencing has also been present in the Youth Olympic Games since its creation. Fencing has been part of the Games a long time, and will probably continue to be for an even longer time.
All three disciplines of fencing (epee, foil, and saber) can be played individually, and in teams. Although the format changed over the years, and that was not always the case, today fencing has 12 events in the Olympics for a total of 78 medals, which are:
Fencing teams are formed by four fencers, of which three compete in the individual event. That way it is possible for a fencer to go back home with two Olympic medals in the bag.