Lithium, sodium and potassium are in the same group, alkali metals or Group 1A, because the Periodic Table is arranged according to the Periodic Law which states that chemical properties repeat at regular intervals.
Here's an analogy to help you undertand how Dmitri Mendeleev arranged the Periodic Table: Imagine that you have a cut-up calendar page with 30 little squares thay have a date and day of the week. You lay them out in order of date, because the numbers present a logical way to organize them. You then observe that the order of days of the week repeats after seven squares, so you start a new row every seven squares and put it beneath the previous row. You now have a calendar page, with the Sundays in one column, the Mondays in the next, and so forth.
When Mendeleev organized the elements in order of mass (atomic number wasn't known at the time), he found properties among the main group elements (groups 1A, 2A and 3A-8A) that repeated every eight elements. This is what led him to end each row with a noble gas and start each new row with an Alkali Metal. Li, Na and K all ended up in the Alkali Metals group because of this pattern that grouped similar elements. They have similar chemical properties because they all have one valence electron which they lose easily to form a +1 ion. They all react vigorously with water to form hydrogen gas and hydroxide ion.