Begin to lift the bar by driving your heels into the ground and standing up to a natural position. Be sure to pull the bar in tight to your body while standing keeping the bar against your legs.
Lower the bar by leaning forward and pulling your hips back, maintaing neutral spine and keeping the bar tight against your legs is essential. Ideally you will finish lowering the bar in the exact position you began the movement in. If not stand up and reset your position.
If you notice your knees keep shooting forward before the bar has passed them then you are not pulling your hips back or leaning forward.