The yellow object and the red object are what I want to join together
If Ctrl-J doesn't work, then you may have a different version of blender (perhaps the older one) which might have a different hot key assigned. You can check that out in file tab -> user preferences -> input and in 3d view, you can change the assigned hot keys.
Further you can use this video if you need : https://www.google.com/url?sa=t&source=web&rct=j&url=https://m.youtube.com/watch%3Fv%3De02O2RPe4bw&ved=2ahUKEwivi6-yv73oAhWw4nMBHQIlDlUQFjABegQICxAJ&usg=AOvVaw0nIQ87x9tRgjiycvBMiaIx
Hope it helps..