Octal → decimal: digit × weight, then add. Octal weights are powers of 8: 1, 8, 64, 512, 4096.
Decimal → octal: repeated division by 8. Each remainder (0 to 7) is one octal digit, starting from the right, so read them last to first.
You can also go through binary: convert to binary, then group the bits in threes from the right (binary octal conversion). That route is handy when you already have the binary, or need hex as well.
A quick sanity check: an octal number never contains 8 or 9. If a remainder comes out as 8 or more, you divided by the wrong number.