This talk is concerned with nonlinear elliptic equations on irregular domains. In the first part of this talk, I summarize the results on the Wiener criterion, which characterizes a regular boundary point. Our approach, which is based on nonlinear potential theory, can be applied to both local and nonlocal operators. The second part of this talk is devoted to the random homogenization of an obstacle problem for elliptic operators with Orlicz growth and fully nonlinear operators. In both cases, the limit profile satisfies a homogenized equation without obstacles, if we assume the stationary ergodicity on the perforating holes with critical size. The heart of analysis lies in capturing the asymptotic behavior of oscillating solutions, by means of energy and viscosity method, respectively.