Details may vary but in essence the following applies (assuming it is a research/teaching university):
Scientific publications. The list is judged on quality, usually determined by h-index, number of citations and publications per year in some combination.
Funding. The ability of the applicant to attract funds.
Academic experience. This could be anything from teaching through administrative tasks, within a university or in international circles. the latter may be important since the person brings in a network of contacts.
Clearly, it is possible that a department may look for a younger promising scientists to build a new environment and many positions may be strategic to expand a department or to strengthen it uncertain ways. Hence the current position may have very little influence on the appointment. It all boils down to what the department is looking for.
Whether it is possible to employ a full professor as assistant or vice versa, is difficult to answer. generally, yes, but the meaning of full, associate, assistant professor varies and does not exist everywhere. So the picture is more complex here and I believe the search criteria is what is looked at. I can imagine, that being full professor may be a disadvantage if the position is looking for someone to be assistant but then it is up to the applicant to accept (or not) the conditions.