a) The boy playing with the toy car is laughing loudly.
b) The boy playing with the toy car are laughing loudly.
Then why?
It's very simple: if the subject is single, the verb must also be single. That's what 'agreement' is all about.
So only a) is correct because it has a singular subject (boy) and a singular verb form (is). Example b) is wrong because it has a singular subject (boy), but a plural verb (are), so they don't match, or agree.
Another way to check the agreement in your examples is to omit the relative clause:
a) The boy is laughing loudly.
b) *The boy are laughing loudly.