how do I tell the difference between flirting and friendliness?
Flirting is tinged with sexuality, either explicit or subtle. Maybe a touch on your arm, a wink, or innuendo. A lot of it is context-dependent, as well: for instance, the exact same words and behavior can be flirting when a guy says it to a girl, but not when a guy says it to a guy (the social default is that everyone is straight; this is different in a gay bar, for instance).
Also, how do you go from talking to someone at the beginning/end of class (or other activity) to actually being the kind of friends who see each other elsewhere and do activities together?
You have to actually be active and ask the person for their phone number, invite them to get coffee, go bowling, whatever. It doesn’t always work out—you may not meet up with 90% of them—but the other 10% will become your friends.
Flirting is tinged with sexuality, either explicit or subtle. Maybe a touch on your arm, a wink, or innuendo. A lot of it is context-dependent, as well: for instance, the exact same words and behavior can be flirting when a guy says it to a girl, but not when a guy says it to a guy (the social default is that everyone is straight; this is different in a gay bar, for instance).
You have to actually be active and ask the person for their phone number, invite them to get coffee, go bowling, whatever. It doesn’t always work out—you may not meet up with 90% of them—but the other 10% will become your friends.