Army planes are always Ki-x.
Navy planes are always LetterNumberLetterNumber.
The first letter is for the plane's role. A = carrier fighter, J = land based fighter, N = float plane fighter, D = dive bomber, B = carrier based level/torpedo bomber, G = land based level/torpedo bomber, H = flying boat
The first number is how many such have been in service. For example the A6M was the sixth carrier based fighter in IJN service.
The second letter is for the plane's manufacturer. A = Aichi, D = Douglas, K = Kawanishi, M = Mitsubishi, N = Nakajima, Y = Yokosuka
The second number is the mark number. For example, the A6M3 is the Mk III of the A6M.
A lower case third letter would be a sub-varient of the mark. For example the A6M5 also had the A6M5a, A6M5b (the one in AH) and the A6M5c.
A dash and a letter would mean that the original design had been modified to a new role, with the new role's letter being placed here. For example the N1K2-J is the Mk II (2) version of a land based fighter (-J) based on the first (1) float plane fighter (N) in the IJN and was built by Kawanishi (K).
N1K1 Kyufu "Rex":
N1K1-J Shiden "George":
N1K2-J Shiden-Kai "George 21":