"Groove" has to do with taking a strict metronomic beat and then striking certain notes in each measure either slightly ahead of, or slightly behind, the strict metronomic beat. In a rock music groove, for instance, the dominant beats in 4/4 time are beats 2 and 4. The notes on those beats would be sounded in strict, unwavering time. The "groove" would be created by varying other notes in each measure in a subtle fashion.
Which notes to vary in time, and by what degree, is what creates different kinds of grooves.
The term "groove" first came into play in mid-to-late African-American styles such as R&B ("Rhythm and Blues") and later funk.
The precursor terms to "groove" are "swing" and "shuffle", which describe specific kinds of shifting of rhythmic emphasis that first appeared in jazz, which again, is ultimately an African-American musical innovation. Swing and shuffle have to do with taking a 4/4 rhythm and imposing an underlying 12/8 rhythm with shifting in emphasis of the eighth-note offbeats of 4/4 so that they almost take on a triplet feel, shifting that off-beat eighth note to line up with the third eighth note in a 12/8 grouping. There is much written on this subject. For an understanding of "swing", study dance band jazz from the 1930s or 1940s, such as that by Count Basie, Duke Ellington, or Glenn Miller. For a good example of "shuffle", listen to Texas-style blues-rock like ZZ Top.
I must insist that you will never understand or appreciate "groove" if you only listen to music that is not from the African-American tradition and is from the last thirty years or so. Start with African-American music from the USA going back at least to the mid-20th century.