What is the difference between yuri and shoujo-ai, yaoi and shounen-ai and ecchi and hentai anime genre? Yuri and Shoujo-ai are anime themes which are related to girl-to-girl relationship, while yaoi and shounen-ai are related to boy-to-boy relationships. But what are their distinct difference? When can you call a specific girl-to-girl anime a yuri or shoujo-ai? When can you call a specific boy-to-boy anime a yaoi or shounen-ai?

Plus, what is the distinct difference of ecchi and hentai anime? I just know that they are both for adults only-theme anime. When can you call a specific anime an ecchi or hentai?
For Yuri vs. Shoujo-ai, according to Wikipedia:

Yuri focuses on the sexual or the emotional aspects of the relationship, or both, the latter of which sometimes being called shōjo-ai by western fans.

Also,

In North America, yuri has initially been used to denote only the most explicit end of the spectrum, deemed primarily as a variety of hentai. Following the pattern of shōnen-ai, a term already in use in North America to describe content involving non-sexual relationships between men, western fans coined the term shōjo-ai to describe yuri without explicit sex. In Japan the term shōjo-ai (少女愛?, lit. girl love) is not used with this meaning, and instead tends to denote pedophilia (actual or perceived), with a similar meaning to the term lolicon (Lolita complex). The western use of yuri has broadened in the 2000s, picking up connotations from the Japanese use.

To summarize, the way it is used depends on who you ask. In North America, shoujo-ai is generally less explicit/sexual, while in Japan it generally denotes pedophilia.
Yaoi vs. Shounun-ai:

The terms yaoi and shōnen-ai are sometimes used by Western fans to differentiate between the contents of the genre. In this case, yaoi is used to describe titles that contain largely sex scenes and other sexually explicit themes and shōnen-ai is used to describe titles that focus more on romance and do not include explicit sexual content, although they may include implicit sexual content.

Also,

Shōnen-ai originally connoted ephebophilia or pederasty in Japan, but from the early 1970s to the late 1980s, was used to describe a new genre of shōjo manga, primarily by the Year 24 Group, about beautiful boys in love. Characteristics of shōnen-ai include that they were exotic, often taking place in Europe, and idealistic.

The yaoi vs shounen-ai distinction is similar to the yuri vs shoujo-ai one.
For ecchi

The word is not only common in Japan, it is also used worldwide inside the fandom of Japanese media to describe sexual themes or undertones. While the word ecchi could mean anything from mild to insulting in Japanese language, it is used in Western culture to divide between pornography (hentai) and playful usage of sexualized imagery (ecchi). Works considered as ecchi do not show any sexual intercourse or primary sexual characteristics. Instead, it is up to the imagination of the viewer.

For hentai

[Hentai] is a Japanese word that, in the West, describes sexually explicit or pornographic comics and animation—especially those of Japanese origin, such as anime, manga, and eroge.
The English use of hentai is more similar to the way the Japanese use the slang term エッチ (H or ecchi), which refers to any sexually explicit content or behaviour. The Japanese seldom use the term hentai to refer to pornography in Japan.
Adult anime, or hentai anime, is anime that relies primarily on sex. Adult manga, or hentai manga, is manga designed for purely pornographic purposes. Plot is still used to develop character and setting, but most of the time, the ultimate goal is to show scenes of sexuality with few exceptions.

For ecchi vs. hentai, the difference seems to be also mostly dependent on who you ask. In America, hentai and ecchi are generally synonymous, while in Japan, hentai is sexually explicit while ecchi is generally not.