There was a slight chance that you could have become pregnant by this particular type of fooling around, but not very likely. There can be sperm cells swimming in the liquid that was present on your boyfriend’s penis, not as many as there are in ejaculate (otherwise known as cum), but there can be some, and it only takes one to impregnate a female.
In this instance, because you have already had your period, that is your body’s sign to you that you are not currently pregnant.
I agree that you need to talk to someone, maybe a trusted female adult (school counselor, cousin, aunt, mother, friend’s mother) to learn how pregnancies occur, and how they (and sexually transmitted diseases otherwise known as STD’s or VD for venereal disease) can be prevented.
I’m not sure how old you are, but you sound a bit naive and unprepared to be even considering having sex or fooling around with boys, simply because you do not understand how pregnancy works. Planned Parenthood would be a good place to go to get information. There are many books that you could buy or check out at the public library too, about where babies come from and how to prevent pregnancy and disease.