Welcome to Black and White, the best game of (mostly) attention.
You are controlling the small square and move it by drag this one. To change the color of the square, tap on it.
To gain points, you must change the squares outer color so that it matches the upcoming color from the right. For example, if black is headed your way, you must change your border to black as well. Once you have passed a color though, you are safe to change borders again to a different color.
Specially, your points may reduce one point if your border color does not must match the spikes border color as well. So, you should look at the obstacles carefully to change the suitable border color.
Heres where you need to be careful, because depending on what color the spike is above, you may not be able to see its border. In the rush of the game, the inner color will then look like a border, leading you to lose.
Good luck.
PS: Its easier if you start off by not bothering about the spikes.