As you can see in the picture there are several bulges or bumps in the wing that are located in the aileron and flaps. Somebody told me these are to hide the linear actuator, pushrod, and control horn. However, if the bulge is connected to the wing and aileron how is it possible for it to be there? If the aileron is moving independent of the wing, how is the bulge connected to both at the same time?
Yes they are fairings for the actuating mechanism for the control surface. I can't speak directly to the F-22's details but, this kind of thing is done on lots of airplanes. The F-22's control surface blister fairings are perhaps a bit more sophisticated and 100 times more expensive, but the concept isn't all that special.
The blister on the fixed structure will have an overlap with the blister on the moving element. The blister on the moving element, like the aileron in the image below, will slip under the fixed part of the blister when it moves down, and there will be additional material forward of the joint that is exposed when the aileron moves up to maintain the contour.
In the somewhat grainy image, you can make out a dark line along the interface between aileron and wing that follows the profile of the blister (along with staining that could be discoloration from seeping hydraulic fluid). There is likely a flexible seal strip to provide the smoothest possible transition but with enough compliance to accommodate the geometric changes in the surface contour, as the two halves of the bulge telescope with each other, and still keep the aerodynamic seal.
In profile it would look something like this:
Conceptually, it is a ball and socket. Practically, it is a cross-section of a ball and socket joint. It does not have a hinge. The defined shape of the bulge is not set by its own motion at all and is shaped in the way that it is so that it will maintain its general shape at all possible positions along its plane of motion. I would assume the value is to the aerodynamic calculations and not having to constantly account for drastically different surface area and shape depending on if the plane if flying up or down;keeping values as static as possible. The drawing is pretty accurate in the way it shows what you are talking about, is essentially, a hinge 'cover'.