This is quite a difficult question because there are all kind of quality aspects to software code. These aspects are nicely defined in the ISO/IEC 25010 standard. It ranges from reliability (no bugs) to maintainability (is my code comprehensive).
Two easy ways to start with code quality are to start with manual code reviews and to use the compiler warnings as your “free” code checker. You can even use “treat warnings as errors” in your build environment to ensure no compiler warnings are accepted any more.