If the reason for staying in the UK is to stay with your child because your child is attending an English school, you will not need a visa if your stay is for less than 6 months. However, you must carry the same documents that you need to apply for a visa to show to officials at the UK border.
If you have a criminal record or have previously been refused entry to the UK, it is advisable to apply for a visa.
If your stay is longer than 6 months you will be able to apply for a Parent of a Child Student visa if your child is under 12 years old and attends a full-time public school.
The Honorary Consulate of San Marino endeavours to keep the information above updated but strongly recommends checking the UK government website for any eventual changes.