it can be fistula or
fissure in ano.after proper examination only it can be diagnosed,u can give sitz bath,that is keep warm water in a tub and sit in it for 10 minuter which will reduce the local pain and swelling,u need proper medicines afterpersonally consulting a doctor