The standard form in modern Mandarin is
摩擦.
磨擦 is a recognized variant - older texts and some dialect usage prefer it because
磨 ('to grind') feels closer in meaning to the action. In physics textbooks, scientific writing, and exams, always use
摩擦. Don't confuse with
磨蹭 ('to dawdle'), which is a different word entirely.