As meditation requires you to sit still for a while, it is important that you can sustain your posture without major discomfort. As a beginner, you should not attempt to sit in the full lotus position (with your feet placed on your thighs), because this will make your hips hurt right away.
Generally, it is necessary to sit upright with a straight spine not leaning on a backrest. You can sit on a chair or kneel on a thick cushion. As your body wonâ€™t be used to sitting without movement and even the kneeling position is new to your knees, you have to be patient with your body and extend your meditation sessions gradually.
Especially as a beginner, you will often be distracted by all kinds of pains and aches in your body. In my opinion, it is better to find as comfortable a position as possible (still with your back straight…) rather than trying to be brave. The more you get into meditation, the more you will just notice your sensations without being distracted by them.