Assistant professor vs Associate professor What's the difference between an associate professor and an assistant professor?

What can one of them do that the other can't? and which is a higher level? can any of them supervise a PhD student?
In a typical university in the United States:

An assistant professor is an entry-level faculty member.  They are generally on the tenure track (although the term "assistant professor" does not guarantee this) but do not have tenure yet.  Typically, within about seven years an assistant professor will either be promoted to associate professor or will leave the university, although the timing can vary a little and it's theoretically possible to remain an assistant professor forever.

An associate professor is one step up from an assistant professor.  This promotion is usually the same as getting tenure, but not always.  (Some universities, like MIT, frequently have non-tenured associate professors.)  The final step for most faculty is a full professorship.

As for what an associate professor can do that an assistant professor can't, that varies even more than the terminology.  In many US universities, the only additional power an associate professor has is voting on who gets tenure, but I wouldn't claim this is universally true.