You need a Child Arrangements Order from a court. (They've replaced 'contact orders'). However a court won't grant one unless you've already been down the road of family mediation via a MIAM (= mediation and assessment meeting) or you can prove an exemption from attending a MIAM. Legal aid cover is available for the cost of MIAMs for those who qualify. Further information is available here:
http://www.familymediationcouncil.org.uk/#
If that doesn't work you can then apply for the order using this form:
http://hmctsformfinder.justice.gov.uk/courtfinder/forms/c100-eng.pdf
for which you need to read these notes:
http://hmctsformfinder.justice.gov.uk/courtfinder/forms/cb007-eng.pdf
(which also explain further about mediation)
If you're in receipt of certain benefits (including income-related ESA) you won't have to pay any court fee. If you're not in receipt of any such benefits but still have a low income then (depending on the level of that income) you pay either nothing or a reduced fee. You need to complete this form to declare your entitlement to a remission of the fee:
http://hmctsformfinder.justice.gov.uk/courtfinder/forms/ex160a-eng.pdf