Edit in JSFiddle

setTimeout(function() {
  document.querySelector(".square").className += ' move';
}, 2000);
<!DOCTYPE html>
<html>
  <head>
    <title>네모 굴리기 - 세 파일로 분리 버전</title>
    <meta charset="utf-8" />
  </head>
  <body>
    <div class="square"></div>
    <script>
    </script>
  </body>
</html>
.square {
  width: 100px;
  height: 100px;
  border: 1px solid red;
}
.square.move {
  margin-left: 400px;
  transition: 4s;
  transform: rotate(360deg)
}