Boys Love (typically shortened to BL) began as a subgenre of shoujo manga in the 1970s, replicating the relationship dynamics from the Class S stories of the early 20th century which centered around intense love stories between girls – very often senpai and kohai pairs – during their school years.
Later, the focus shifted from young women to beautiful young men, with the 1961 novel A Lovers' Forest by Mari Mori, which follows the relationship between a professor and his younger male lover, is regarded as an influential precursor to the genre.
The first BL manga stories, such as Moto Hagio's The Heart of Thomas and Keiko Takemiya's The Song of Wind and Trees, were described by contemporaries as shounen-ai, which translates as boys love, or tanbi, which means aesthetic.
The term "yaoi" was created in the late 1970s by manga artists Yasuko Sakata and Akiko Hatsu as a shortening of the phrase "yama nashi, ochi nashi, imi nashi", meaning "no climax, no point, no meaning" – the creators of these manga works felt that they were concentrating on the sexual content of the work to the exclusion of elements such as characterization, and self-deprecatingly coined the term "yaoi" as a result. These yaoi stories were usually doujinshi works, about topics such as pop stars David Bowie or Freddie Mercury, rather than original traditionally published titles.
For a number of western fans, the terms "shounen-ai" and "yaoi" retain these early meanings: shounen-ai is softly romantic, oftentimes tragic, but not focused primarily on scenes of sex; yaoi is more explicit, and stringently adheres to top and bottom – seme and uke – roles for the characters.
While many western fans have adopted the term Boys Love / BL to refer to the genre as a whole, "yaoi" remains a popular term also, with the two being used largely interchangeably – in the west, there's largely no difference between BL and yaoi. This is not the case in Asia, where Boys Love – or, even more popularly, simply BL – has been the preferred term for the genre since the 1990s, with "yaoi" becoming more antiquated and still referring specifically to more explicit works.
The key thing to remember when it comes to terminology such as BL/Boys Love, yaoi, and shounen-ai is that the terms will mean different things to different people – not only will it make a difference whether you're speaking to a Japanese person or a westerner, it may also make a huge difference between different people from the west, as different generations and fandoms favor different terms. Make sure you're on the same page as to what you're talking about – you don't want to recommend something soft and sweet to someone looking for something spicy and explicit!