You didn't say what type of livestock you want to contain. Here is just a general idea of how to put up fence.
We put our wooden posts at least 2 feet in the ground. If your soil is rocky and you can't go that deep, go as deep as you can and fill the hole with redimix concrete and rocks.
Most posts are spaced about 8 to 10 feet apart for woven wire fencing. Wooden posts are generally solid and you mount your barbed wire using U-shaped fence staples. Just stretch the wire across the post, hold the fence staple across the wire and hammer it down like a nail. You would also secure woven wire fencing the same way. You will need to use a fence stretching tool to get keep your fence tight while you are put it up. A farm supply store will have all the materials you need. They can also guide you as to the best fencing choices for the type of livestock you want to contain.
Keep in mind that metal T-Post work great when working with barbed wire or woven wire. You can use them in places you cannot dig or drive a wooden post. They have their own type of wire clip to hold your fencing in place. We use them for areas we can't use the post hole drill. They also work great fencing off creek beds and sink hole areas you don't want to drive a tractor over.
Hope this helps.