The meaning of cosplay has changed considerably in the last decade, but let me try to explain how I see it. Mind you, please consider this my opinion of the evolution of the definition of cosplay and not a definitive one. Cosplay has a broad degree of meanings depending on the person asked.
The wearing of costumes has existed throughout different cultures for centuries. For many people, when you mention costume, their thoughts turn to Halloween and of children going Trick or Treating. They may also think of elaborately created outfits for movies and the theater.
Fan costuming started in the United States. The first well-known example being Forrest Ackerman and Myrtle Douglas who attended the first WorldCon (World Science Fiction Convention) in 1939. They put together "futuristic" costumes for the event. Others who attended followed in their lead expanding the number of people who costumed at events such as this. Over the years, the types of conventions expanded to cover many different genres. There are sci-fi, literary, furry, anime, comic, costuming, and multi-genre conventions and theme specific conventions such as Star Trek, Star Wars, My Little Pony, and Dr. Who. This is not an all encompassing list as there are fan conventions that cover every topic, but these are generally the ones that come to mind in fandom.
Cosplay, the term we have come to recognize, was coined by Nobuyuki Takahashi after he visited WorldCon in 1984. Impressed by the the costumes he saw, he wrote about it when he returned to Japan. Cosplay is a portmanteau of the words "costume" and "play". There had been sci-fi conventions in Japan since the 60's, so costuming had existed there a while. However, the term cosplay grew in use until it was commonplace in the 90's, especially at huge fan events in Japan like Comiket. Cosplay at this point was used to describe costumes that typically consisted of characters from anime and manga.
It was in the mid to late 1990's where interest in anime and manga was beginning to grow in the US. For many of us, it was having that one connection that was able to get hold of the 10th copy of a VHS tape and being able to share it with others in anime clubs. Anime conventions were just starting to pop up and sometimes that was where you could watch the first episodes of a new anime. The internet was just beginning to grow, and you could not just stream a new episode of an anime or a scan of a manga. So you might hear about a convention through a public chat room, but for the most part, knowing a convention was happening was through word of mouth or a mailing list - the snail mail kind. The term cosplay, at this time in the US, represented costumes that related to characters from anime and manga and had the notion that those in cosplay would be somewhat in character. Cosplay would normally be handmade outfits as cosplayers could only acquire character costumes by making it themselves or having the design commissioned.
Throughout the 2000's, the number of anime conventions increased, and with it, the number of people who attended and costumed. The internet made it easy to locate conventions and see the myriad of costumes that people wore. Fandom for the most part is a very opening and welcome group. Cosplayers welcomed costumes from multiple genres outside of anime and manga. Anime conventions saw a growth in costumes from TV shows, movies, comic books, American cartoons, and original costumes. Some anime conventions did frown upon the diversity that grew in costuming because their non-profit statuses needed them to remain true to their mission statements. Most anime conventions are non-profits, and are based on the education of anime, manga, and Asian culture. So costumes outside of anime, manga, and Asian culture do not necessarily contribute to their cause. Even so, most cosplay competitions continued to admit only costumes based on anime, manga, Asian art, and Asian based video games. The most popular anime series was now being shown on television and available to the masses. Cosplay had grown to the point where you could look online and find stores that would produce character outfits or they were ready made. There was mass production of components of cosplays from the most popular series. Cosplayers no longer needed to have sewing or crafting skills to participate in cosplay.
Somewhere around 2010, there seemed to be a significant shift in how the term cosplay was used. The term cosplay was still used mostly around the fandom that gathered around conventions, and conventions were now becoming a hot commodity. As fandom and geekdom became mainstream and less of a stigma, more conventions activities made it into mainstream media. It was no longer a niche of nerds or geeks who attended and/or costumed. Media outlets were now reporting on these events and exposed the world to cosplay and costuming at these events. As the media picked up on the term, the definition changed to represent costumes in general. Cosplay, and the use of the word, became trendy.
Today, the general use of the term cosplay encompasses costuming in general. They can be original, character, fantasy, sci-fi, and a multitude of a mixtures of genre based costumes. There are shows dedicated to the craft. Take for instance, Heroes of Cosplay or Cosplay Melee. I will not be going into the details of these shows, just noting they exist, and to show that the cosplay niche has become more mainstream.
One may still find people that cling to specific meanings of costuming and cosplay. There are those who will not use the term cosplay at all and refer to it all as costuming. Some still refer to cosplay as being specifically a subset of costuming of anime, manga, and Asian origins. Just know that for many people cosplay and costuming goes hand in hand and means the same thing. Whatever your definition of cosplay or costuming, embrace it and enjoy it.