Make sure its got some kind of anchoring to keep it in the ground firstly. If you just have straight bars it will work itself loose. Digg holes about 1.5ft x 1.5ft and maby 2ft deep? then fill with some concrete let it set this makes a nice solid foundation and will stop cracking. then place int the swing and top it up. Let it set and ur done!
First measure four sides of the swing legs .point them in the ground by chuck ,then make hole at least 2'x2' .locate the swing in the holes and level the bar horizontally and vertically .This can be by adding under one or tow legs or excavating under the legs .To be more secure if you using bricks under the legs will help to concrete reach under the legs .Apply concrete use ready mix concrete and make it not to liquorish cause ground will observe the water from the concrete . After 48 hours you can use the swing .
NOTICE: if swing legs has brackets for screw method you should locate the anchor bolt in the concrete using a fixture fram to hold the bolts in concrete .
All the DIY stores sell 'Postcrete'. You dig a hole(s) pop the post in half fill the hole with water, tip in sufficient dry post mix then add water to make it all just wet. No mixing is needed and, this is the good part, it sets in minutes!